Skip to main content
Archived

TimeZoneConverter Transformer

  • Feb 1, 2018 12:00 AM UTC
  • 5 replies
  • 76 views

fmelizard
Safer
Forum|alt.badge.img+22

This transformer could:

  • convert datetime values from one time zone into another;
  • set time zone;
  • reset time zone;
  • remove time zone.

The time zone can be provided as UTC offset, <utc> (for +00:00), or <local> (for system local time zone).

Please vote this idea if this transformer would be helpful.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

lifalin2016
Influencer
Forum|alt.badge.img+41
  • Influencer
  • Feb 8, 2018 9:22 AM UTC

Although Python already supports handling datetime's with timezone-info, and a custom transformer could be built with it, it's not a trivial task to handle it properly. Are you suggesting a simple "assign/convert-to-from-local/dst" transformer, or the full blown monty, i.e. with a full (and updated) timezone database (e.g. convert Japanese time to US Eastern time while at DST)?


Forum|alt.badge.img

Time zone info can be accepted in form of UTC offset (e.g. -08:00) or as <local> which means system time zone (including daylight saving). At the moment FME does not support time zone abbreviations (e.g. PST) and full time zone names (e.g. North America, Vancouver), therefore the proposed transformer won't be able to deal with these time zone representations either.


chriswilson
Enthusiast
Forum|alt.badge.img+29
  • Enthusiast
  • Feb 19, 2018 11:03 PM UTC

Yes, working between NZ and Australia this is always a consideration for us! Could it incorporate daylight savings? Possibly tricky.


bruceharold
Influencer
Forum|alt.badge.img+19
  • Influencer
  • Feb 23, 2018 10:40 PM UTC

 

Hi Chris, snippet from a PythonCaller I was using to set UTC from NZST timestamps in LINZ's data downloads. Be aware though daylight saving times are 'magic' - unknowable to software and at the mercy of politicians, which given the current crop in NZ could mean anything :-).

 

 

 

tz.py

chriswilson
Enthusiast
Forum|alt.badge.img+29
  • Enthusiast
  • Feb 26, 2018 5:21 AM UTC
I'd suggest that this functionality should be added - abbreviations are generally set and accepted, similar to airport codes (though I don't expect FME to deal with those!). Abbreviations are more commonly known than offsets are, in my experience.