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 ?
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…
FWIW, I would not recommend using Shotwell to do this. I was a longtime Shotwell user but am now looking to switch away, and the straw that broke the camel’s back was that I spent a bunch of time carefully fixing timestamps on some RAW photos, only to discover a few weeks later that Shotwell had lost all the changes. Shotwell extracts JPGs from the RAW files on the filesystem, and it appears that it only applied the timestamp modifications to the JPG files, then later overwrote them with the original timestamps from the unmodified RAW files. This was the last in a long string of frustrating bugs/unfeatures in Shotwell, and I no longer trust it to handle my files properly.
I’m a little late to this thread, but exiftool does have the ability to shift the datetime of metadata: