Adjust a picture’s create date using exiftool

This is another important command I tend to forget. Sometimes I forget to set my camera clock correctly before a shooting. That’s bad especially when I’m using two cameras with different date/time settings. Then all my images appear mixed up as I normally sort by time.
On linux however it’s easy to fix using exiftool:

exiftool "-DateTimeOriginal+=5:10:2 10:48:0" FILE

will correct the create date of the image FILE by adding 5 years, 10 months, 2 days 10 hours and 48 minutes.

This is a post from my old blog http://tech.cbjck.de. It has been moved here and slightly edited for better readability. It's also been adjusted to the new layout.
The content however is old and might be outdated.
Adjust the times to your needs. If you have multiple files to correct place them in one directory and run

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

That’s a lot faster than correcting each of them by

find DIR -name PATTERN -exec exiftool "-DateTimeOriginal+=5:10:2 10:48:0" {} \;

This command will look for all files matching the pattern (ie by camera name) and then execute the exiftool command on each single file.

To change not only the exif DateTimeOriginal string but all times at once use

exiftool -AllDates+=5:10:2 10:48:0 FILE

References

Leave a Reply

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