coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: Grann0n on November 12, 2011, 09:51:20 PM

Title: Replace Date by Exif Date in DB
Post by: Grann0n on November 12, 2011, 09:51:20 PM
Hi all,

I've one thousand and half pictures to upload (I made a new website and decided to install a fresh coppermine instead of using the old one) and I want to use the EXIF date for sorting pictures.

I found no MOD for the last version (and don't want to maintain one) and I'm looking for a SQL script or a batch process to replace the upload date in DB by the one coming for the EXIF.

Thanks for help
Title: Re: Replace Date by Exif Date in DB
Post by: ΑndrĂ© on November 15, 2011, 03:30:49 PM
It's not recommended to manipulate the database. If you want to do that anyway, you have to ensure that all of your pictures have the needed EXIF data and Coppermine is able to read it. If you're sure that all data is available, you have to write a small script that reads the data from the exif table, calculates the timestamp from the correct exif field and write it to the corresponding row in the pictures table, for each picture.