How to determine current timezone name (in "Europe/London" format)

2 posts / 0 new
Last post
broadblues
broadblues's picture
Offline
Last seen: 4 years 10 months ago
Joined: 2012-05-02 21:48
How to determine current timezone name (in "Europe/London" format)

I need to know what the current TZID is for generating TZID in VTIMEZONE ical sub elements.

timezone.library returns a good deal of useful info, but as far as I can tell not this bit...

I can get the short 3 character timezone name but not the longer IANA name.

The info must at some level be availabe to the OS as the advanced TimeZonePrefs tab can set the TZ variable to this value.

Any ideas of the best way to get this info? Best this case for me is most OS friendly using API cals an not by parsing the Locale:TimeZone files direct...

This section of my project is mainly written in python, but I can make info available via the ARexx port of my main binary (AOrgansier - diary).

jabirulo
jabirulo's picture
Offline
Last seen: 1 month 3 weeks ago
Joined: 2013-05-30 00:53
Re: How to determine current timezone name (in "Europe/London...

Looks there is no "direct" way of getting such string/name.

Timezone prefs seems to get the country name (in english) from the left listbrowser and then opens .timezone file to get such full-country name (using application_lib prefsobject/xml_parsing).
And to localize country name (left listbrowser string) it uses country.catalog and the 3 letter "acronym" of each country to GetLocaleStr().

AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P

Log in or register to post comments