Timezone offset not handled correctly
I have two photos taken with two cameras only a few seconds apart. But the timezone of the cameras differ. This is correctly reflected in EXIF, but Lightroom fails to recognize this.
The FIRST photo has the following relevant exif tags (as per exiftool -H -n):
0x9003 Date/Time Original : 2026:03:29 16:52:55
0x9004 Create Date : 2026:03:29 16:52:55
0x9010 Offset Time : +01:00
0x9011 Offset Time Original : +01:00
0x9012 Offset Time Digitized : +01:00and Lightroom Classic’s getRawMetadata returns
dateTime = "796488775"
dateTimeDigitized = "796488775"
dateTimeDigitizedISO8601 = "2026-03-29T16:52:55+01:00"
dateTimeISO8601 = "2026-03-29T16:52:55+01:00"
dateTimeOriginal = "796488775"
dateTimeOriginalISO8601 = "2026-03-29T16:52:55.000+01:00"
now the SECOND photo has:
0x9003 Date/Time Original : 2026:03:29 11:52:09
0x9004 Create Date : 2026:03:29 11:52:09
0x9010 Offset Time : -04:00
0x9011 Offset Time Original : -04:00
0x9012 Offset Time Digitized : -04:00and
dateTime = "796470729.685"
dateTimeDigitized = "796470729.685"
dateTimeDigitizedISO8601 = "2026-03-29T11:52:09.684722-04:00"
dateTimeISO8601 = "2026-03-29T11:52:09.684722-04:00"
dateTimeOriginal = "796470729.685"
dateTimeOriginalISO8601 = "2026-03-29T11:52:09.684722-04:00"
Remarkably ALL timestamps are wrong:
from datetime import *
from zoneinfo import *
epoch = datetime(2001,1,1,tzinfo=ZoneInfo('GMT'))
str(epoch + timedelta(seconds=796488775))
# '2026-03-29 14:52:55+00:00'
str(epoch + timedelta(seconds=796470729))
# '2026-03-29 09:52:09+00:00'The first photo timestamp is offset by 1 hour (this is 14:52+0 is 15:52+1) the second timestamp is wrong by 6 hours (9:52+0 is 5:52-4). Interestingly, their difference matches the difference in the two timezones.
This causes user visible problems beyond the Lua API: Both photos, even though taken seconds apart are sorted in library view according to their timestamps, to they are 5h apart when sorting by capture time and not next to each other.
