22

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

Is there a solution to change the time for all files in a directory to +/- 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.

Matthias Braun
  • 7,797
  • 7
  • 45
  • 54
Werner
  • 221
  • 1
  • 2
  • 3
  • 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

4 Answers4

24

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
Will
  • 2,664
  • 18
  • 26
9

From a comment at petapixel.com and also another answer, here are 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'
Matthias Braun
  • 7,797
  • 7
  • 45
  • 54
Grzegorz Wierzowiecki
  • 13,865
  • 23
  • 89
  • 137
0

Shotwell

Also possible with Shotwell (0.28+)

Settings:

screenshot settings

Select all the photos and:

screenshot

Test with

identify -verbose *.jpg | grep 1992 # or "DateTime:\|exif:Make:\|exif:Model\|Filesize\|Flash:\|pixels:"
Pablo A
  • 2,307
  • 1
  • 22
  • 34
-1

DigiKam can do it too:

Batch > Time adjust

You can add/subtract time to a goup of photos and more options

  • Could you please add more info to your answer? Batch it isn't on main menu, and [digiKam manual](https://userbase.kde.org/Digikam/Exif/en) says _"digiKam doesn’t allow you to apply the same EXIF data to multiple photos in a single operation"_ – Pablo A May 22 '21 at 06:45
  • On Digikam 7.1.0. Select multiple images, "Item" -> "Adjust time & Date" – Xabier Hualde May 24 '21 at 06:45