How to Shift the EXIF Timestamps for a Large Batch of Photos

Here’s a friendly public service announcement: remember to time on your camera before and after Daylight Savings Time (which just ended yesterday in the United States) — unlike cell phones, digital cameras generally don’t adjust their own time. If you accidentally forgot and now have a bunch of photos with timestamps that are off by an hour, there are some programs out there that can help you set things right.

Adobe Lightroom (Windows/Mac)

Adobe Lightroom has a feature for editing the photo capture time in your metadata. It’s found under Metadata->Edit Capture Time. In the dialog box that pops up, you’ll be able to adjust your photos to a specific date and time, shift by a certain number of hours, and change the Capture Time to the File Creation Date.

Picasa (Windows/Mac)

Photography StackExchange user Rabarberski writes,

Using Picasa […] it’s very easy to either shift or set the date of a batch of photos. And it’s cross-platform (Windows, OSX and Linux) and free. And no terminal fiddling… Open Picasa. Select your photos. Click Tools > Adjust Date and Time. Fill in as required.

JHead (Windows/Mac/*nix)

JHead is a powerful command line tool for editing EXIF data. While it’s not as user friendly as other GUI-based options, it allows you to apply date and time offsets to large batches of photographs.


Adjust time stored in the Exif header by h:mm backwards or forwards. Useful when having taken pictures with the wrong time set on the camera, such as after travelling across time zones, or when daylight savings time has changed.

ExifTool (Windows/Mac/*nix)

ExifTool is another popular and powerful command-line EXIF data editor.

Say for example that your camera clock was reset to 2000:01:01 00:00:00 when you put in a new battery at 2005:11:03 10:48:00. Then all of the pictures you took subsequently have timestamps that are wrong by 5 years, 10 months, 2 days, 10 hours and 48 minutes. To fix this, put all of the images in the same directory (“DIR”) and run exiftool:

exiftool “-DateTimeOriginal+=5:10:2 10:48:0″ DIR

Exifer (Windows)

Exifer is a free Windows program that allows you to do a quick and easy time offset adjustment to a batch of photographs through a user-friendly GUI interface.

P.S. Here’s a trick for making sure the timestamps in your photo library are correct when you travel between time zones (it’s not as useful for Daylight Savings Time): whenever you’re in a new time zone, simply take a photograph of a clock that’s correctly set to the local time. This allows you to easily figure out the time offsets and correct the files using the tools listed above.

  • tttulio

    No Aperture?

  • Arvo

    “Take a photo of a clock to help you figure out the offset”
    …. Or you know, you could just take 20seconds to change the clock in your camera.

  • joakim

    *nux? thought you wrote it like *nix

  • Tony R.

    exifTool won’t work as shown in the example above due to incorrect option syntax. The correct syntax for the example should be:

    exiftool -DateTimeOriginal ‘+=5:10:2 10:48:0′ .

    This will work if exifTool is run in a terminal windo in the directory where the image files are located (current working directory = “.”). The example adds 5 years, 10 months and 2 days to the date, 10 hours, 48 minutes and 0 seconds to the time in the Exif metadata.

    A more realistic example would be having forgotten to reset the camera’s clock when time changed from Daylight Saving Time to Standard Time on the night of November 3-4 2012; the camera clock has also drifted by 2 minutes ahead (fast) since it was last set:

    exiftool -DateTimeOriginal ‘-=0:0:0 1:2:0′ .

    (Yes, that’s a period at the end of the command lines, separated from the rest of the command by a space.)

  • willt

    Date/time shift is built into Aperture. Look under the Metadata menu.

  • Tony R.

    Here’s an example of how to fix the Exif timestamps and the hard drive timestamps for a batch of files with exiftool. I performed this procedure on a set of over 100 files from the camera of a friend who had forgotten to change the camera’s clock after we switched from Daylight Saving Time to Standard Time early this last November. The batch of photos has an Exif timestamp and file timestamp exactly one hour later in the day than they were actually taken (clock was advanced one hour during Daylight Saving Time). The advantage of this approach is that it preserves the complete timestamp in the hard drive directory, including the seconds count.

    Important: For safety, one should perform this operation on a copy of the file set, so that if something goes wrong, one can go back to the original files from the camera!

    Step 1: Adjust Exif metadata to the correct time by running the following command in a terminal window in the directory containing the camera JPG files. The command reads the DateTimeOriginal value from the file, then performs a subtract-and-replace operation, renames the original file with _original appended to the file name extension (.JPG becomes .JPG_original) and writes the modified file out with the original name, but with the current system time as the new created/modified time in the hard drive’s directory.

    exiftool -DateTimeOriginal-=’0:0:0 1:0:0′ .

    Step 2: Delete all the original JPEG files, i.e., the ones that exiftool renamed with “.JPG_original” in their extensions.

    Step 3: Read DateTimeOriginal from each file and assign it to the file’s date/time stamp.

    exiftool ‘-FileModifyDate<DateTimeOriginal’ .

    In this example the time was corrected for the switch from Daylight Saving Time to Standard Time. To correct for the switch from Standard Time to Daylight Saving Time, in Step 1 replace -= with +=, to add an hour instead of subtracting an hour. You can also include the minutes and seconds parameters in the second triplet of values if the camera’s clock has drifted since the last time it was set.

    NOTE: There was a slight problem in the syntax of my earlier comment, above. The apostrophes should appear to the right of the equal sign, and there shouldn’t be a space after DateTimeOriginal. The corrected command strings would be as follows:

    exiftool -DateTimeOriginal+=’5:10:2 10:48:0′ .

    exiftool -DateTimeOriginal-=’0:0:0 1:3:0′ .

  • nguyen2011

    Thank you! Free version works for me, JPG only.

  • jthelw

    This is great! I already use Picasa but I had no idea it could correct the metadata.