10

In question Change file created date from JPEG EXIF metadata there are great scripts, to update file-system date, to match date stored in the file. But what if “Date and Time (original)” are bad in exif-data (because of wrong set time in camera).

Is there a solution to change time for all files in a directory about +/- n minutes? Either correct the exif data (and then use one of the great scripts from the link above) or only correct the timestamp of the files.

  • See jhead and its -ta option – Stéphane Chazelas Jul 2 '14 at 20:12
  • I end up quite often in this situation when I collect photos after vacation from different cameras from different people, so I need to "shift" a bit for each source of photos. – Grzegorz Wierzowiecki Jul 19 '15 at 12:39
10
+50

The tool you need is called jhead. Some OSs release it via their package managers, but this is the home of jhead, and you can download the latest version from there.

From the jhead manual:

-ta Adjust time stored in the Exif header by h:mm forwards or backwards. 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. This option uses the time from the "DateTimeOriginal" (tag 0x9003) field, but sets all the time fields in the Exif header to the new value.

Examples:

Adjust time one hour forward (you would use this after you forgot to set daylight savings time on the digicam)

jhead -ta+1:00 *.jpg

Adjust time back by 23 seconds (you would use this to get the timestamps from two digicams in sync after you found that they didn't quite align)

jhead -ta-0:00:23 *.jpg

Adjust time forward by 2 days and 1 hour (49 hours)

jhead -ta+49 *.jpg
3

From: comment at site and also another answer , some examples how to achieve this with exiftool:

exiftool “-DateTimeOriginal+=0:1:2 3:4:5″
exiftool -DateTimeOriginal+='5:10:2 10:48:0'
exiftool -DateTimeOriginal-='0:0:0 1:3:0'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.