Bug 443098 - Use time zone for EXIF supplied dates
Summary: Use time zone for EXIF supplied dates
Status: RESOLVED DUPLICATE of bug 251357
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Date (show other bugs)
Version: 7.3.0
Platform: unspecified Unspecified
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-29 01:44 UTC by adam.siembida
Modified: 2021-09-29 18:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description adam.siembida 2021-09-29 01:44:48 UTC
SUMMARY

I've been evaluating digiKam and I've been having a lot of trouble with massaging the metadata to make the Thumbnail view display the files in an order I believe to be reasonable.

It took a lot of experimentation and even digging through code to figure out what is going on. I'm still not sure, but I believe that EXIF dates take priority over XMP dates, and the `core/dplugins/generic/metadata/metadataedit/xmp/xmporigin.cpp` file shows the accepted XMP dates and the order of precedence.

I also noticed that even when EXIF OffsetTimeOriginal is included (the time zone for the TimeDateOriginal), that it isn't used in determining the order of photos. For example, I could take a photo (A), fly to a different time zone, take another photo (B), and B could show up BEFORE A.

HOWEVER.
1. If I create an XMP date, for example using ExifTool `exiftool -Composite:SubSecDateTimeOriginal>XMP:DateCreated`, which will write a date (that includes timezone) in XMP::photoshop\DateCreated\DateCreated\0
2. Clear all the EXIF dates so that the XMP date is the only one. `exiftool -a -all:all= filename`.

Now digiKam will actually use the timezone to sort the order of images, so in the scenario before, A would now, in fact, show up before B.

I believe that if the EXIF date takes priority over the more advanced and specific XMP date, it MUST also use the timezone (OffsetTimeXXX) for sorting and ordering.

At this point the only way to get correct sorting of photographs is to create an XMP date and the you have to actually remove the EXIF dates, which I believe should not be necessary.
Comment 1 Maik Qualmann 2021-09-29 05:59:23 UTC

*** This bug has been marked as a duplicate of bug 251357 ***
Comment 2 adam.siembida 2021-09-29 13:42:12 UTC
(In reply to Maik Qualmann from comment #1)
> 
> *** This bug has been marked as a duplicate of bug 251357 ***

I don't really believe that bug is a duplicate. The other bug is talking about adding new features for specifically dealing with timezone; for example "to be [sic]bale to have the 'local time' of the picture as well as the time zone it was taken in."

This bug is requesting to treat EXIF dates in a similar fashion to XMP DateCreated, which *already* takes into account the timezone for certain *existing* features. The way the photos show up in the Thumbnail view is that the time of the photo shows the local time where the photo was taken (regardless of EXIF or XMP), but for XMP dates it is already doing chronological ordering.
Comment 3 Maik Qualmann 2021-09-29 18:01:35 UTC
I think the bug report fits.
If we support EXIF OffsetTimeOriginal, we're closer to a correct date. However, this requires a current Exiv2 version and current cameras that also write this time zone offset date information.

We have received many images over the years from users who have had problems with dates. The XMP metadata was mostly responsible for the incorrect detection. The XMP metadata was changed/defected by various programs.

You have the second bug report with the wish to prefer XMP metadata for dates.

Maik