forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 miscellaneous => Topic started by: Hanna. on November 10, 2018, 03:43:01 am

Title: Time properties for added files
Post by: Hanna. on November 10, 2018, 03:43:01 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.
Title: Re: Time properties for added files
Post by: ron4mac on November 10, 2018, 05:39:18 am
That essentially represents zero time (hasn't been set yet). Gets set to a time after the image gets hit/viewed.
Title: Re: Time properties for added files
Post by: 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?
Title: Re: Time properties for added files
Post by: ron4mac on November 10, 2018, 07:41:13 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.
Title: Re: Time properties for added files
Post by: gmc on November 12, 2018, 12:21:06 am
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...