Add capture date to images

I imported and edited a bunch of photos and just noticed that the original files don’t have metadata for the capture date and time. This is obviously not great and means that the timeline view at the bottom will use the file creation date. I would also like to add the capture date to the exported photos.

Is there a way to manually add the real capture date to the photos?

I found the “metadata editor” module, but it doesn’t allow me to edit the capture date. The geo tagging tool is also rather useless in this case, because I could only define an offset in hours.

Hi @fvollmer and welcome!

a) What OS are you on?

b) Check if exiftool is available for you. if so: read it’s manual.

Have fun!
Claes in Lund, Sweden

Welcome aboard!

Several questions to help in answering:

  • What make/model of camera were the photos from?
  • How did you import them?
  • What version of darktable? From where?
  • What operating system and version?

You can use the exiftool command line or a GUI there is one with a simplistic GUI but it has many key options …I think this is the one you are looking for…image

When you open it it looks like this…it spreads the exiftool commands into some menus grouped by related functions…

I’m kind of surprised by the amount of comments. Thanks for helping :slight_smile:

  • I’m on windows 10 (and also ubuntu, which I’m currently not using for photos, but more for development)
  • I’m using darktable 3.4.0
  • exiftool is a solution from outside darktable. I wasn’t aware that it could manipulate xmp files, but it seems like a good idea for an external tool.
  • The Make/model of camera is also not available. The photos were taken by a professional who erased all meta data. There isn’t anything I can do about this.
  • The files were imported via the “folder…” button

I just checked out the darktable source code and it seems like it should be possible to add editing of the creation date to the metadata module…

This looks like it could be useful

2 Likes

Of course it’s possible. Another question is if it’s desirable : acquisition date/time is in principle write- once, like camera make/type and lens info. I.e. a normal user should never have any reason to change those. If it’s needed, it’s because there’s a SNAFU somewhere else in the chain.

Where would be the best place to add date and time of the photo for a scanned negative for example? The date of scan in this instance is not the important one for a timeline.

Indeed, date/time of scanning is not the most useful for a timeline. Then again, it is the original date of the scan, which can be useful as well, for tracing purposes. So changing it to the date of the original negative might not be optimal either.

But is dt the best tool to editsuch metadata? It’s basically an image editor, so for me that means it should not touch metadata that are not supposed to be changed when editing.

I’d say for the case you mention (scanned negatives), either the acquitision program should allow adding such information, or a third program (exiftool, exiv2, …). Basically, as close as possible to the acquisition.
And again, not dt, as it should be a special case for most users, and it concerns fields that are not supposed to be edited. Using an external program helps reinforcing that notion of “don’t do this unless you know why you should”.

I don’t necessarily disagree, but to play devil’s advocate, isn’t darktable also about user choice? It has extensive DAM capabilities, so I wouldn’t say that adding this functionality goes against its philosophy. I’m sure it could be added in such a way that it would be hard to change this metadata accidentally.

There is a lua script called adjust_time.lua in GitHub - wpferguson/extra-dt-lua-scripts: Extra lua scripts for darktable that can't or wont be included in the distributed darktable-org/lua-scripts, that can be used to adjust the EXIF date time in the database.

On master, geotagging module is now able to set both offset or date time on images.