PHP Script to Update the Date in the Exif Photo Headers
When I returned from my trip to NYC I realized that the camera was set to the wrong date!. I left the camera without batteries a long time and the camera reset to year 1900. So all photos had the wrong date in the EXIF headers, with 295 photos manually correct each one was not an option. Well. I realized that all I have to do to correct the photos is take one phote see the date in that photo and substract that date from the actual date of the photo to obtain the time difference between the photos. Then I wrote a php shell script to walk over all photos and add that time difference to each photo. The script is here updatedate.zip .
Before you try to execute it you need php 5 and pel (php exif library).
But beware pel-0.9 has a bug in the PelTag.php file, so you will have to download the latest peltag.php from cvs. If you see the following error that means that you have the old PelTag.php
Fatal error: Cannot redefine class constant PelTag::XP_COMMENT in pel\PelTag.php on line 1086
And then all you have to do is to edit the update.php file and put the dates there