Ruben Laguna's blog

Sep 13, 2006 - 1 minute read - camera date exif headers pel photo photos php script Uncategorized

PHP script to update the date in the exif photo headers

And then all you have to do is to edit the update.php file and put the dates there

$cameradate = mktime(1 , 0, 0, 11, 30, 1999);
$tripstartdate = mktime(10, 0, 0, 3, 2, 2006);

the mktime format is documented here.

mktime* (hour,minute,second, month,day,year)

The command line format is

php updatedate.php xxx.jpg

and it will output to filename with the prefix “new-”. If you want to apply it to a several files then you can do

ls *.jpg|xargs php updatedate.php