Bug 517889 - XMP sidecar CreateDate written without timezone offset, causing apps such as Immich to assume UTC and display incorrect times
Summary: XMP sidecar CreateDate written without timezone offset, causing apps such as ...
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Date (other bugs)
Version First Reported In: 9.0.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-03-20 11:26 UTC by Stephen Hilton
Modified: 2026-04-19 06:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Fill XMP file for example (2.90 KB, application/octet-stream)
2026-03-20 11:26 UTC, Stephen Hilton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Hilton 2026-03-20 11:26:40 UTC
Created attachment 190844 [details]
Fill XMP file for example

SUMMARY
XMP sidecar CreateDate written without timezone offset, causing apps such as Immich to assume UTC and display incorrect times

DESCRIPTION
When digiKam writes date metadata to XMP sidecar files, date fields such as xmp:CreateDate are written without a timezone offset. For example, a photo taken at 3:00pm AEST (UTC+10:00) will be written as:
2026-03-20T15:00:00
rather than the correct:
2026-03-20T15:00:00+10:00
Any application that reads only the XMP sidecar (rather than the embedded EXIF data inside the image file) has no timezone context and will typically assume the naive timestamp represents UTC. Immich is a prominent example of such an application — when it ingests XMP sidecar files, it reads the date value as-is and treats it as UTC, causing photos to appear as if they were taken 10 hours earlier (for a UTC+10 user). This results in photos being sorted and displayed at the wrong time, and potentially on the wrong date.  Where the is a mix of photos with no sidecar and with sidecar, some will show the correct date/time and some the incorrect date/time.
The XMP specification fully supports ISO 8601 date/time values with timezone offsets. The EXIF data embedded in the image itself typically does carry the correct offset (via EXIF:OffsetTimeOriginal), but this information is not being propagated into the XMP sidecar when digiKam writes it.
The fix would be to include the UTC offset from the source EXIF data when writing date fields to XMP sidecars.

STEPS TO REPRODUCE
1. Import an image taken in a non-UTC timezone where the EXIF data contains a timezone offset (e.g. EXIF:OffsetTimeOriginal = +10:00)
2. Configure digiKam to write metadata to XMP sidecar files
3. After digiKam writes the sidecar, open the .xmp file in a text editor
4. Inspect the xmp:CreateDate (and related date) fields

OBSERVED RESULT
Date fields are written without a timezone offset, e.g.:
2026-03-20T15:00:00

Any application that reads only the XMP sidecar and assumes naive timestamps are UTC will display the time incorrectly — for example, Immich will show the photo as having been taken at 05:00am UTC rather than 03:00pm local time.

EXPECTED RESULT
Date fields in the XMP sidecar include the UTC offset sourced from EXIF, e.g.:
2026-03-20T15:00:00+10:00

SOFTWARE/OS VERSIONS
Windows: 11 25H2 Build 26200.8037
Digikam 9.0.0

ADDITIONAL INFORMATION

Example EXIF data from a Nikon NEF:
exiftool -OffsetTimeOriginal -OffsetTime -OffsetTimeDigitized -DateTimeOriginal -CreateDate -ModifyDate 20260308_112047.NEF
Offset Time Original            : +11:00
Offset Time                     : +11:00
Offset Time Digitized           : +11:00
Date/Time Original              : 2026:03:08 11:20:47
Create Date                     : 2026:03:08 11:20:47
Modify Date                     : 2026:03:08 11:20:47

Example metadata from the corresponding xmp file written by Digikam
   xmp:ModifyDate="2026-03-08T11:20:47.04"
   xmp:CreateDate="2026-03-08T11:20:47.04"
   photoshop:DateCreated="2026-03-08T11:20:47.04">

RELATED BUGS
Bug 485836 — Feature request to edit timezone offset fields in the Time & Date Editor
Bug 495506 — Preserve timezone offset timestamp in metadata
Bug 510261 — Video dates incorrect because timezone is not considered (developer Maik Qualmann acknowledged timezone offset support needs to be added)
Comment 1 Maik Qualmann 2026-03-20 12:21:01 UTC
Why open another bug report when we already have three? Adding timezone support is extensive, involving database changes, image scanner code, date metadata, etc.

Maik
Comment 2 Maik Qualmann 2026-04-19 06:41:22 UTC
Git commit ad5bb7d1da29dc6d90e4961d53afe79bbfa429b3 by Maik Qualmann.
Committed on 19/04/2026 at 06:40.
Pushed by mqualmann into branch 'master'.

prepare database update to add ImageTagProperties index and a timezone field
Related: bug 519125, bug 514970, bug 510261, bug 495506, bug 491608, bug 485836, bug 251357

M  +46   -1    core/data/database/dbconfig.xml.cmake.in
M  +8    -0    core/libs/database/coredb/coredbschemaupdater.cpp

https://invent.kde.org/graphics/digikam/-/commit/ad5bb7d1da29dc6d90e4961d53afe79bbfa429b3