Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Time properties for added files  (Read 3343 times)

0 Members and 1 Guest are viewing this topic.

Hanna.

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 227
  • webstar
Time properties for added files
« 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.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Time properties for added files
« Reply #1 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.
Logged

Hanna.

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 227
  • webstar
Re: Time properties for added files
« Reply #2 on: November 10, 2018, 04:10:28 pm »

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

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Time properties for added files
« Reply #3 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.
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: Time properties for added files
« Reply #4 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...
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.