I was very excited about your new way of handling dates and especially time offsets, so I upgraded to v2023. I'm using 2023.1.18.
I'm still trying to understand the new system but I am having problems in my testing.
To make it simple I am using an image with all the metadata stripped out and a single date (1 March 2023) added to Exif:DateTimeOriginal. No time offset is present.
I used the File.DateTime mapping mode 2 (the default).
My current Windows time zone is Europe/London (+01:00, because of DST).
I add the file to the database and as expected VarToy shows:
File.DateTime.UTCOffset - +01:00
File.DateTime - 01/03/2023 12:00:00
File.DateTime.TZO - 01/03/2023 12:00:00+01:00
File.DateTime.Original - 01/03/2023 12:00:00
File.DateTime.UTC - 01/03/2023 11:00:00
File.DateTime.UTC.TZO - 01/03/2023 11:00:00Z
File.DateTime.Local - 01/03/2023 11:00:00
File.DateTime.Local.TZO - 01/03/2023 11:00:00+01:00
File.MD.XMP::photoshop\DateCreated\DateCreated\0 - 2023:03:01 12:00:00+01:00
File.MD.XMP::xmp\CreateDate\CreateDate\0 - 2023:03:01 12:00:00+01:00
This needs correcting because DST was not in effect on 1 March, so in the metadata panel I change +01:00 to +00:00 in File.MD.XMP::photoshop\DateCreated\DateCreated\0
I click the green tick, click the pencil icon to write back. But the offset remains +01:00. (In fact if I click back into the field after I click the green tick but before I write-back, I can see that the contents have gone back to +01:00)
This is weird, but then it gets weirder.
I change File.MD.XMP::photoshop\DateCreated\DateCreated\0 programmatically to +00:00 (using Python). This results in VarToy showing:
File.MD.XMP::photoshop\DateCreated\DateCreated\0 - 2023:03:01 12:00:00+00:00
Hooray!
But in the metadata panel the date shown is
01/03/2023 12:00:00
And if I click in the field it shows
2023:03:01 12:00:00+01:00
!!
I can then change File.MD.XMP::photoshop\DateCreated\DateCreated\0 BACK to +01:00 by forcing a write-back.
Please can you help?
I don't know if this problem is related to the fix #01836 related to the feature of hiding offsets that match the local time zone (which incidentally is very much an unwanted feature for me - can I turn it off?) Or possibly #01790?
QuoteBut in the metadata panel the date shown is
01/03/2023 12:00:00
And if I click in the field it shows
2023:03:01 12:00:00+01:00
If the time zone offset matches your local time zone, the MD panel suppresses the offset to improve readability.
No tzo => your time zone. See Time zone Offsets in the Metadata Panel (https://www.photools.com/help/imatch/how-imatch-uses-date-and-time.htm?dl=hid-23)
All the other stuff: Probably this is caused by some sort of check / automatic in the metadata panel triggered by you setting the offset to 00:00. I shall look into this.
If you set the time zone offset to something like +01:00 or -01:00 or +02:00, does this work?
QuoteIf you set the time zone offset to something like +01:00 or -01:00 or +02:00, does this work?
Yes. Looks like just +00:00 is rejected.
QuoteIf the time zone offset matches your local time zone, the MD panel suppresses the offset to improve readability.
Yes I know. This is causing other concerns - I'll raise a separate post about it.
QuoteYes I know. This is causing other concerns - I'll raise a separate post about it.
Feel free to add a feature request. But the current logic (
no time zone offset displayed => in my local time zone) should work quite nicely for most users.
I have fixed the issue with the 00:00 time zone offset. A parsing / validation routine did not properly differentiate between no time zone offset and 0 time zone offset.
Thanks Mario.