Issue: When importing images that do not have an EXIF “DateTimeOriginal” set, the XMP sidecar that is created has a blank field: exif:DateTimeOriginal=" ".
I really don’t understand this. XMP files don’t contain any exif entries, except for the DateTimeOriginal. (Open an XMP that DT creates, and you’ll find this on line 9.)
The issue is that there are zero tools which can edit the XMP file’s entry for exif:DateTimeOriginal, only the exif data’s DateTimeOriginal itself. So using ExifTool, Digikam, etc., I can update the exif data for DateTimeOriginal, but because the XMP has already been created with that field blank, DT does not respect this update, and there’s no way to change it short of opening each XMP with a text editor.
I would just delete all the XMPs, but those have ratings, edits, etc.
Steps for Reproduction:
Remove DateTimeOriginal information from JPG.
Import into DT.
XMP files will be created. Open XMP. Line 9 will have the entry exif:DateTimeOriginal=" ".
does the job with this example xmp : test.xmp (7.4 KB)
Execute this command after you stopped dt. Otherwise dt will overwrite your modified xmp with the content of it’s database.
And select Preferences → storage → look for updated xmp files on startup before you launch dt again.
Interesting, thanks for the command. I’ve been using ExifToolGUI and it won’t allow editing XMP DateTimeOriginal, for some reason. Same with Digikam. But good to have this as a solid method.
Any reason for DT to copy that exif line over? It doesn’t copy anything else – seems kind of strange, especially because it seems like no other program uses it. (Indeed, no other program gives much to acknowledge it. Digikam can show it in a modified XMP metadata view, but won’t allow you to edit it.)
Can be an issue or not. Could you check if this field is not on your original image file ? by the command: exiv2 -PEIX imagefilename | grep DateTimeOriginal
If there is no such field that may be an issue and you could open an issue here.
You could also set the date in dt with the geotagging module. Would that be a valid workaround ?