Lots of cameras have a wrong date configured. Mine is even worse: It has a dead internal battery, so it looses the date and time every time I turn it off. When you take a picture, the wrong date is saved to the meta data tags of the resulting photographs. Afterwards, you import them with a photo management tool such as shotwell, and they show up in the wrong place. Sorting doesn’t give you a chronological order. So I was looking for a simple tool to fix the embedded dates. I found exiv2. To install it, type:
sudo apt-get install exiv2
Strangely, it seems to allow only shifting the timestamp and not explicitly setting it. But that’s ok, it is probably the more common case. To adjust the timestamp from 25.7.2009 to 17.6.2012 execute the following:
exiv2 ad -Y3 -O-1 -D-8 ~/Pictures/2009/07/GOPR050*.JPG
Update 06.09.2020:
Turns out it is also possible to set the date on images that had no EXIF data, although the command is a bit more verbose:
exiv2 -v -M"set Exif.Photo.DateTimeOriginal 2020:09:05 07:17:00" 09/RunAndFly4.jpg
Leave a Reply