Change EXIF + database date of RAW pictures


(Aurélien Pierre) #1

When I got my new camera, a year ago, I didn’t notice that the date/time was factory reset, so I have quite a few shoots of 2017 (1400 pics over 5 months) that are dated from 2014… Which is quite annoying when I browse darktable’s lighttables in chronologic order.

Fortunately enough, the dates of the files on the disk are OK. What’s messed up are the EXIF meta-data and corresponding fields into the darktable database. Furthermore, the timeshift is constant.

Is there a simple/clever way to copy the date of the files to the EXIF meta-data (or alternatively, timeshift them) for all the pictures from a specific camera taken between 2 dates and update darktable, or do I have to script something complicated piping SQLite3 and exiftools ?

(Mica) #2

You can use exiftool to read the xmp file, do the time shift, then make sure the darktable preference for rereading the sidecar at start up is checked, write the change to the sidecar, and that’ll update the database. You could do another exiftool command to write the dates from the sidecar into the raw file’s metadata.


I have had good experience shifting times on a bunch of pictures using Shotwell. I understand it’s a major change in workflow, but it might be useful to open the pics in there once and just use it for that purpose…