Time properties for added files Time properties for added files
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Time properties for added files

Started by Hanna., November 10, 2018, 03:43:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hanna.

Quote from: ron4mac on November 08, 2018, 02:40:07 AM
For views: {hits}
For date: you can try {mtime} (although you won't like it)

I'll soon add some formatting for things, like date, that don't display well in their raw format.

Speaking of time. This new gallery I have been working on has a different time format set up. My mtime is not correct to begin with... my other galleries shows todays date or relevant date but this one shows 1000-exex. I suppose ctime is correct but mtime is not.

How do I fix this? I uploaded the test.jpg just 5 min ago through batch new files in my gallery. See attached.

ron4mac

That essentially represents zero time (hasn't been set yet). Gets set to a time after the image gets hit/viewed.

Hanna.

So you are saying this is normal, it is supposed to look like that going forward?

ron4mac

Quote from: Hanna. on November 10, 2018, 04:10:28 PM
So you are saying this is normal, it is supposed to look like that going forward?

Yes, it starts out like that. Gets set to the date the image was last viewed, if your config is set to do that.

gmc

If I recall - we used to use 0000-00-00 as the date default - but a change in MySQL with strict settings no longer accepts that as a valid date.  Sounds like 1000-01-01 is the new 'default' used.

Verifying in my galleries - my older one have a mtime default defined in the database of '0000-00-00 00:00:00'.
My newest test gallery - a 1.6.x clean install has the mtime default set to '1000-01-01 00:00:00'..

So any display logic showing this date/time needs to consider that 1000-01-01 is a 'not set' condition...
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money