Need help with timezone information

Started by ben, December 30, 2020, 10:27:22 PM

Previous topic - Next topic

ben

Hello everyone,

i am having struggle with some files containing time zone information.
Depending "where in iMatch and how" i use the date information, there is a time difference of one hour.
I "think" i am using the same XMP data in all cases.

The time is either 12:33:54 or 13:33:54


       
  • Metadatapanel:           2020:08:12 13:33:54+02:00    ({File.MD.XMP::xmp\CreateDate\CreateDate\0})
  • VarToy:                      12.08.2020  12:33:54               ({File.MD.XMP::xmp\CreateDate\CreateDate\0})
  • FileWindowTip:           12.08.2020  12:33:54               ({File.MD.XMP::xmp\CreateDate\CreateDate\0|format:DD.MM.YYYY [..]
  • Sorting in file window:   according  13:33:54               (My sort order is configured using "XMP::xmp\CreateDate")

I appreciate your help.
Ben

Mario

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

ben

You mean where I am currently staying?
Berlin

Mario

The Metadata Panel displays a time-zone, when the tag contains one. As is.

IMatch applies the local time zone when displaying date and time by default.
This also applies to variables using a date, time or date/time component.

For a time-zone of +01:00 (Germany) and the two time stamps you'll get

2020:01:01 12:00:00+02:00 => 01.01.2020 11:00:00
2020:01:01 12:00:00+01:00 => 01.01.2020 12:00:00

To get the unformatted value for your variable, use {File.MD.XMP::xmp\CreateDate\CreateDate|value:rawfrm}.
See Supported value: Attributes: for more info.
This applies to the VarToy and your custom File Window Tip (the default tip only displays the date, but not the time).

When you create a custom sort based on metadata tags, you can only choose between treating the tag as a string or as a number.
The sort routines don't know anything about the tag and treat it as configured. If the tag has more than one value, the values are concatenated for sorting. There are no special provisions for timestamps or other non-string/number data types. It's strictly string compare or number compare.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ben

QuoteThe Metadata Panel displays a time-zone, when the tag contains one. As is.
IMatch applies the local time zone when displaying date and time by default.
Thanks Mario, I tested your comments with some test files. It behaves like you explain.


QuoteWhen you create a custom sort based on metadata tags, you can only choose between treating the tag as a string or as a number.
Question 1:
Does this also apply if i sort based on the attribute "date & time" as it is offered in the preferences->sort profiles window?
For me, it still seems to be the same like sorting based on the metadata "XMP::xmp\CreateDate".


Question 2:
Is it somehow possible to remove the timezone information for all of my files?
I think it would be easier without it.

Thanks a lot!

Mario

QuoteIs it somehow possible to remove the timezone information for all of my files?

You may want to look into the Time Wiz app for this purpose. It offers options for dealing with time-zone information.

IMatch maps a suitable date and time value (see How IMatch uses Date and Time Information) during import into the global File.DateTime tag. This is used in many places, also for sorting. I'm not into the details anymore how time-zone data / local time-zone is applied for the many possible source tags at the moment. I'm also away from my development PC for a while now (New Year and all that). I may look into this next year unless I forget it.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ben

I will have a look at it and ask again next year if i need to.

QuoteI'm also away from my development PC for a while now (New Year and all that). I may look into this next year unless I forget it.
Happy new year and enjoy your days off!