a-eye icon indicating copy to clipboard operation
a-eye copied to clipboard

XMP exif_date lacks timestamp, causing PhotoPrism to import photos at 00:00 UTC

Open dreherd opened this issue 7 months ago • 1 comments

Hi, great work on this tool, I really love it!

I've encountered an issue when using the generated XMP files for AI descriptions and tags in combination with PhotoPrism.

The Problem: PhotoPrism interprets the exif_date field within the XMP file as the primary capture date. Since the current implementation of xmp_writer.py only writes the date (YYYY-MM-DD) without a specific timestamp, PhotoPrism defaults the capture time for all imported photos to 00:00 UTC. This breaks the chronological sorting of the library.

My Analysis: It seems that providing only the date in the XMP metadata causes ambiguity. PhotoPrism gives priority to the XMP sidecar over the internal EXIF data of the image file, leading to the "00:00" overwrite.

My Workaround: I have locally solved this by disabling the date entry in xmp_writer.py altogether, as I personally don't see a strict need for the AI-processed XMP to redefine the capture date.

Alternatively, the script could be modified to include the full ISO 8601 timestamp (including hours, minutes, and seconds) to maintain compatibility with media managers like PhotoPrism.

Best regards,

David

dreherd avatar Apr 30 '26 14:04 dreherd

Good catch, and thanks for explaining exactly what PhotoPrism does with it. The sidecar now carries the full date and time from the EXIF data in all three date fields, so photos should land at the right time rather than midnight. Fixed in the new release.

SpaceinvaderOne avatar Sep 26 '26 13:09 SpaceinvaderOne