Hooray for ExifTool

May 21, 2012 5:58 pm

Ever realize that the date on your camera is wrong and has been for months?  Wish you could correct the timestamps on all those pictures you took?  ExifTool can help (available for Linux/Windows/Mac).

I discovered yesterday that I hadn't updated our camera for Daylight Saving Time, so all the pictures since March 11 have been 1 hour off, not dire, but annoying.  I've had trips in the past where I forgot to change the timezone, but didn't know this tool existed, so the times on those pictures are just wrong.

In Linux I combined ExifTool with the "find" command to locate the photos taken after March 11 and adjust their time data by one hour so that they're correct:

#find . -type f -newermt 2012-03-11 -iname "*.jpg" -print -exec exiftool -AllDates+=1 -overwrite_original_in_place '{}' \;

I'll just stash this here for future reference, as I will probably need it again.

3 thoughts on “Hooray for ExifTool”

  1. No need to use "find":

    exiftool -r . -ext jpg -if '$createdate gt "2012:03:11"' -alldates+=1 -overwrite_original_in_place

  2. Hey even better!

    I had seen the recursive switch, but missed the conditional in my perusal of the documentation.

    This is a better solution since it uses the date in the EXIF data rather than the filesystem (which can result in errors if you took a picture before DST and then edited it to produce a derivative in a new file after DST).

    Thanks Phil! (I assume you are _the_ Phil Harvey, so: Also thanks for creating such a useful program and sharing it with the world.)

Leave a Reply

Your email address will not be published. Required fields are marked *