Tuesday, October 8, 2013

Fix bad timezones in EXIF on JPEG photos

If you're like me you always forget to change the timezone on your camera when you fly somewhere. It's often not until partway through the trip that I remember. Unless you remember to change the timezone before you take any pictures it's probably easiest to leave the camera in your home timezone. In fact, this is better all round since then you don't need to remember to switch it back either.

If you feel compelled to change it, take a photo of your watch (or just your wrist since no-one wears a watch these days) as a marker to remind yourself at what point the times change, since you'll need to work on just the photos with the wrong zone. If you're taking photos in many different timezones that's probably a good idea too.

When you get your photos to a computer there's a quick easy way to fix the time information on your photos on linux. Use exiv2 to modify the EXIF timestamp, this shifts the timestamps back by three hours:
exiv2 -a -03 adjust *.JPG
Then use this to set all the file modification times to the same value as the EXIF:
exiv2 -T rename *.JPG

No comments: