change date uploaded change date uploaded
 

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

change date uploaded

Started by Pasci, October 04, 2004, 12:29:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pasci

Hello there:

Is it possible to manually changed the date where it says "Uploaded on xx.xx.xxxx"?
I want to add the date when the fotos were actually taken and not when I uploaded the photos.
Thank you for your help in advance.

Joachim Müller

has been asked before, please search the board.

Joachim

Pasci

#2
Hello GauGau:

I went to the phpmyadmin and tried to edit the 'cpgalbums' table. However, when I go to the "last_addition" column, it shows '0000-00-00 00:00:00' for each album, eventhough it says 'October 4th 2004' in the photo gallery. In other words, I am not sure which table or column/row i should change. I tried to change '0000-00-00 00:00:00' to '2004-09-30 00:00:00' for the album that I want to change, but no change took effect in the gallery.

Pasci

Any ideas from anybody? I searched the forum multiple times for related threads but I could only find this one, which didn't help much.
http://forum.coppermine-gallery.net/index.php?topic=4731.0
you said
Quoteto edit you would have to edit the database albums table, afaik.
what is afaik???

kegobeer

Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

kegobeer

Try looking in the pictures table instead of the albums table, for mtime.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Pasci

Thanks for the reply.
Does it mean I have to change every picture's date in that album??? I changed the mtime of the photo that was selected to be displayed as thumnail in the album overview site, but no change took effect. I'm still stuck on this.

Nibbler

Upload date would be ctime, mtime is last viewed date.

kegobeer

Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Pasci

#9
Thanks again :)

I went to the ctime, and it says '1096884451', what do the numbers stand for? Maybe MMDDYYYYHH??? By the way, the photos were uploaded on October 4th, 2004.
Also, I have like 40 photos in the album. Do I have to change every single one's ctime, just so that it changes the upload time on the gallery site???? I tried to changed the ctime of the photo whose thumbnail is displayed on the album site, but that had no effect. It still shows the original upload time date.

Joachim Müller

the value you see for ctime is a timestamp, representing a date. You can change several/all ctime values at once by running a mySQL query (if you're familiar with phpMyAdmin or similar).

Joachim

Pasci

Thanks Joachim,

so, what does '1096884451' stand for, given that it was uploaded October 4th, 2004?

Joachim Müller

see http://www.php.net/date and the other php time functions refered to on the php manual page.

Joachim

Nibbler

The number is the number of seconds which have passed since January 1st 1970.

jul

Hi

Just a few tips:

http://www.4webhelp.net/us/timestamp.php will convert dates for you...

And if you don't want to change all the dates, just change one in the album and  and tweak the index.php file to display the date of the first picture uploaded instead of the last one:

find the following line
$sql = "SELECT aid, count(pid) as pic_count, max(pid) as last_pid, max(ctime) as last_upload ".

and replace it by

$sql = "SELECT aid, count(pid) as pic_count, max(pid) as last_pid, min(ctime) as last_upload ".

It won't give you the wanted dates for the other files but saves time ;-)

Pasci

@ Jul:

Thank you very muchf or your detailed reply. The timestamp tool from 4webhelp.net was extremely useful. :)