[BBD] Create Date Timezone wrongly altered

Started by sdb, September 14, 2023, 03:18:53 PM

Previous topic - Next topic

sdb

I have quite a few images where I want the Create Date to represent the date the image was scanned and Date Subject Created to represent when the photo was taken.  The metadata for each date includes a timezone offset.  The metatadata for Create Date is correct but DSC needs changing.  When I change just DSC and perform a write-back, the (correct) timezone offset for Create Date is changed and the image flagged for pending write-back.

An example:
Initial metadata:
[XMP:XMP-photoshop] DateCreated                : 2019:09:20 13:47:22+01:00
[XMP:XMP-xmp]  CreateDate                      : 2019:09:20 12:13:38+01:00

I change Date Created to 1990:03:23 12:00:00+00:00 and write-back.

Create Date is then shown as altered in the Metadata panel to 2019:09:20 12:13:38+00:00.

I don't think Create Date should be altered at all.  Instead the timezone offset is changed by copying from the DSC timezone offset (which doesn't match the either my computer's current tzo or my local tzo calculated for the 2019:09:20 date).



 

Mario

Which version of IMatch are you using?
I don't see why IMatch should reset the Create Date to UTC.
If you use IMatch 2023, is the time mapping mode (Edit > Preferences > Metadata 2) set to default?

I've tried to reproduce this using your exact initial date and changes, but I could not.
This is what I see:

Image2.jpg

I start with your data, change date subject created, commit my changes and then write back the file (I've used a JPG file and an NEF RAW for two tests).

The Create Date is not changed by this procedure.

Which file format are you using?
Is there maybe conflicting metadata in that files?
Does ExifTool report any warnings in the Output Panel after the write-back or are there warnings in the log file?

Do you have a sample image which allows me to reproduce this? Then please attach or upload to your cloud space or send to support email address with a link back to this thread.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sdb

Sorry Mario - I should have given more info.
Using iMatch 2023.2.4 (though the images were in iMatch 2021 before I upgraded).
Mapping mode = 1 (though I temporarily switched to 2 and got the same results).

Images are jpeg and I checked and there is conflicting image info.  The IPTC record shows an incorrect +00:00 time zone for the Date/Time Created field (not Create Date).  Also the exif DateTimeOriginal is 1990:03:23 12:00:00 (no time zone) - i.e. the date I want to use for DSC.

I didn't see any warnings from Exiftool or in the log.

I am attaching a test image exhibiting the problem.

sdb

Just out of curiosity I took a new copy of the test image and changed DSC to 1990:03:23 12:00:00+02:00.

Write-back caused the Create Date time zone to change to +02:00!

Mapping mode = 2

sdb

Another copy of the test image.  Mapping mode = 2.

After adding to iMatch, before any changes:
Exiftool says
   [XMP:XMP-photoshop] DateCreated                : 2019:09:20 13:47:22+01:00
   [XMP:XMP-xmp]  CreateDate                      : 2019:09:20 12:13:38+01:00
Metadata panel says same.
No pending write-back.

Change title only and write-back:
Exiftool says
   [XMP:XMP-photoshop] DateCreated                : 2019:09:20 13:47:22+00:00
   [XMP:XMP-xmp]  CreateDate                      : 2019:09:20 12:13:38
Metadata panel says
  CreateDate                      : 2019:09:20 12:13:38+00:00
  DateCreated                : 2019:09:20 13:47:22+00:00
Pending write-back for Create Date only.

Its rather worrying that these fields are being changed, and especially that the DSC change has been written back without warning.

Database diagnostics says all OK.

Mario

Thanks for the sample.

At a first glance, I see some metadata mess in the file already.
The Metadata Analyst shows these issues for your test file:

EXIF DateTimeOriginal and corresponding IPTC timestamp differ.
DigitalCreation timestamp missing.
ExifIFD]:DateTimeOriginal and [XMP-photoshop]:DateCreated (embedded) mismatch.
'1990:03:23 12:00:00' => '2019:09:20 13:47:22+01:00'
[IFD0]:Artist not mapped to [XMP-tiff]:Artist (embedded).

The metadata (mess) was produced by Adobe Photoshop Elements 9.0.
The ECP shows

[ExifIFD]      Date/Time Original   : 1990:03:23 12:00:00
[ExifIFD]      Create Date          : 2019:09:20 12:13:38
[IPTC]          Date Created        : 2019:09:20
[IPTC]          Time Created        : 13:47:22+00:00
[XMP-exif]      Date/Time Original  : 1990:03:23 12:00:00
[XMP-photoshop] Date Created        : 2019:09:20 13:47:22+01:00
[XMP-xmp]      Create Date          : 2019:09:20 12:13:38+01:00

Time zone offsets in XMP, but no matching time zone offsets in EXIF.
IPTC uses a different time zone for the tags mirrored in XMP.

When I change the date subject created and write back, IMatch only writes "data subject created" and the corresponding EXIF tag. IMatch does not write "create date".

Still, create date changes in the file!
This implies that this is some interaction between ExifTool, the legacy IPTC date, the missing EXIF time zone offsets, the different time zones used for IPTC and EXIF and XMP while mapping between IPTC, EXIF and XMP during the mapping phase after write back.

Solution: when I modify both time stamps in the Metadata Panel after import (in my case, I've just clicked the pen in front of the tags to mark them as modified) and write back, the time stamps are unchanged.
And IMatch / ExifTool have a change to resolve the mess with the different time zone offsets in the IPTC, EXIF and XMP data in your sample image, resulting in:

[ExifIFD]      Date/Time Original              : 2019:09:20 13:47:22
[ExifIFD]      Create Date                    : 2019:09:20 12:13:38
[IPTC]          Date Created                    : 2019:09:20
[IPTC]          Time Created                    : 13:47:22+00:00
[XMP-exif]      Date/Time Original              : 2019:09:20 13:47:22+00:00
[XMP-photoshop] Date Created                    : 2019:09:20 13:47:22+00:00
[XMP-xmp]      Create Date                    : 2019:09:20 12:13:38+01:00
[ExifIFD]      Offset Time Original            : +00:00
[ExifIFD]      Offset Time Digitized          : +01:00

I'd recommend you'll do the same or manually fix the metadata mess in the image to resolve this issue.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sdb

I think there might be something else going on with regard to copying the TZO offset from DSC to CD (see my last two posts).  Also your solution seems to result in the correct TZO in DSC changing to an incorrect one; and the solution may not be easily adaptable to programmatic use.

I'll find time to do some more testing, taking into account the 'metadata mess', and hopefully come up with some more constructive comments.

Mario

IMatch does not copy time zone offsets. As I wrote, it does not send instructions to ExifTool to modify CD at all when you only modify DSC in the Metadata Panel.

As per usual with this kind of metadata mess, the first step is to fix / sync things. Which changing both dates in the MD Panel does. Once the data is fixed and synched correctly between EXIF, legacy IPTC and XMP in the image, you can perform the actual changes you want to do in the MD Panel. And they will "stick".

The image file provided basically has different times and time zone offsets in EXIF, legacy IPTC and XMP. ExifTool is probably just trying to fix this during the first write back. This is "outside" of the control of IMatch.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sdb

I understand that the date changes result from Exiftool mapping, but I couldn't understand how a timezone offset (not a complete date) was mapped/copied to a different field.  It turns out I was overlooking the ExifIFD:CreateDate field!

I've spent a lot of hours on this and learned a lot (mainly about how ignorant I still am). Given the importance in iMatch of the XMP Create date and Date Subject Created fields, I was interested to see that iMatch apparently causes Exiftool to map the Exif/IPTC fields to XMP before mapping XMP to Exif.  This explains the changes I have been seeing, and which as you say I can prevent by flagging these fields as modified.  I've figured out how to do this programmatically - whenever I change one of these dates I also 'change' the other by setting it to its current contents.

Thanks for your time on this matter.