Skip to main content
Archived

TimeZoneConverter Transformer

  • February 1, 2018
  • 5 replies
  • 64 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+40
  • Influencer
  • February 8, 2018

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
  • February 8, 2018

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+22
  • Enthusiast
  • February 19, 2018

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
  • February 23, 2018

 

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+22
  • Enthusiast
  • February 26, 2018
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.