"CreateDate" variable shows Local Time in some places and UTC time in Metadata Panel

Started by Jingo, June 16, 2024, 01:45:54 PM

Previous topic - Next topic

Jingo

I recently returned from a trip to Italy where I remembered to set my camera for the current time using UTC (not just resetting the camera time).  The images all had the correct local time and upon bringing them into my system, I noticed the correct time was displaying in the Metadata panel.. Great!

However, I noticed my File Panel was showing the wrong time using my custom template .. odd!  So, I checked the custom template and verified I was using: {File.MD.XMP::xmp\CreateDate\CreateDate\0} and verified this against the variable: Create Date in the Metadata panel.. and sure enough, the times display differently between the two.  Pulling them up in VarTool also shows the "non-UTC" time (or Local Time) in VarTool.  Perhaps this has always been the case and I just never remembered to set the UTC in camera before (I typically just use TimeWiz to change the Create Date in IMatch afterwards)... but figured I'd inquire.

I switched the variable to the {File.DateTime} in my custom template and now they show correctly as taken in the camera but I was wondering why the {..CreateData...} variable displays differently between the MetaData Panels and elsewhere in the system?

Thx - Andy.

iXG7A6B38w.png

f0ASZnZxfX.png


Mario

File.DateTime is in UTC.
Variables display in local time zone by default.
The MD panel shows a +02:00 time-zone offset. Where does this come from?
Is an EXIF time zone offset stored in the image? ExifTool Command Processor, list metadata, search for offset.
Was no time zone information available and IMatch used the local time zone (See Time zone Offsets in the Metadata Panel and File.DateTime Mapping Mode (User-defined Time Zone Offsets))

Use these variables in var for additional checks:

DT: {File.DateTime}
DT: {File.DateTime.TZO}
UTC: {File.DateTime.UTC}
LT: {File.DateTime.Local}
LT: {File.DateTime.Local.TZO}
Org: {File.DateTime.Original}
Org: {File.DateTime.Original.TZO}
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Here are the results:

DT: 5/24/2024 4:22:49 PM
DT: 5/24/2024 4:22:49 PM+02:00
UTC: 5/24/2024 2:22:49 PM
LT: 5/24/2024 10:22:49 AM
LT: 5/24/2024 10:22:49 AM-04:00
Org: 5/24/2024 4:22:49 PM
Org: 5/24/2024 4:22:49 PM+02:00

[ExifIFD]      Offset Time                    : -04:00
[ExifIFD]      Offset Time Digitized          : +02:00

Thx.

Mario

Two different time zone offsets for EXIF is unusual and probably explains what you see.
Not sure why both XMP timestamps use the same offset, that data comes from ExifTool.
I would need to spend time analyzing the image you have used for your test.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Thx Mario... I have sent the image (JPG and ORF) to your support email for review when you have time.  

Just for comparison - I pulled in the original OM-1 RAW ORF file and this file shows the following:

DT: 5/24/2024 4:22:49 PM
DT: 5/24/2024 4:22:49 PM-04:00
UTC: 5/24/2024 8:22:49 PM
LT: 5/24/2024 4:22:49 PM
LT: 5/24/2024 4:22:49 PM-04:00
Org: 5/24/2024 4:22:49 PM
Org: 5/24/2024 4:22:49 PM-04:00



[ExifIFD]      Offset Time                    : +02:00
[ExifIFD]      Offset Time Original            : +02:00
[ExifIFD]      Offset Time Digitized          : +02:00

Hmmm... the RAW file is processed with DxO PhotoLab 7 and is set to include EXIF data (only) in the resulting JPG file.  Not sure of the reason for the differences.  Thx again - Andy.

Mario

The Offset time is for the file modification timestamp so it usually has the local time zone (+04:00?)
The JPG has only "Offset Time Digitized" but is missing the the "Offset Time Original" found in the RAW. Why?

If Offset Time Original  is not included, IMatch applies the time zone mapping mode as explained in File.DateTime Mapping Mode (User-defined Time Zone Offsets)
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Well.. a quick search seems to confirm there is an issue with DxO PhotoLab and the Offset Time Original when exporting... guess I'll need to correct these manually with Exiftool in the meantime but this has been a problem with many versions of DxO and a fix is yet to come.

Mario

You don't need ExifTool.
If you modify "Create Date" and/or "Date Subject Created" in IMatch (Metadata Panel, TimeWiz...) and write-back, the time zone offset from the XMP timestamps is transferred back into EXIF (added/updated) too :)

So, just make sure the time zones for these two time stamps are the way you want them and write back.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook


Mario

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

I've had a quick look at your sample files. A quick check in the fab IMatch Metadata Compare shows:

Image1.jpg

It seems DxO did some strange things when copying date and time into the JPEG.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Thanks Mario for reviewing - it does seem that there is a bug (since at least version 5) where DxO is trying to do something with the offset to adjust time on export. It has been reported a few times but it still remains an issue.  It appears the culprit is the fact they remove Exif:DateTimeOriginal... ?

I tried to play around with TimeWiz but do not seem to be able to find a setting that will keep the DateCreated.

It seems odd to me also that the offset for the ORF file is -0400 in some fields while +0200 in others.  These are from Italy and I believe I set my camera to +0200.  Suppose in the future I'll just set the camera time to local and ignore the offset (which I typically do) or just keep the photos set to local time and then adjust using TimeWiz when I import into IMatch.

Mario

QuoteI tried to play around with TimeWiz but do not seem to be able to find a setting that will keep the DateCreated.

Does this not work?

Image14.jpg

QuoteThe ORF file is -0400 in some fields while +0200 in others. 

Unless the tag was modified by another application, this is the time-zone offset the camera has written.
If you sometimes dial in the local time zone and sometimes you don't, you'll have to fix it.

Select all files with the wrong time zone and run TimeWiz. If you have multiple wrong time zones, repeat as often as needed

Many photographers I know keep their cameras on UTC. Which makes adding time zones later easy, if so desired. Or, in the case of IMatch, optionally display timestamps in UTC or local time.


-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook