On 7/11/2007 1:21 PM, Dave Rolsky wrote:
On Tue, 10 Jul 2007, Bernard Desruisseaux wrote:
Mapping from Windows Time Zone Names to Olson Time Zone Keys http://www.chronos-st.org/Windows-to-Olson.html
Unfortunately, these names are localized in Windows, so this mapping only works for English language Windows versions. I'm using this mapping in a Perl module I wrote (DateTime::TimeZone - http://search.cpan.org/dist/DateTime-TimeZone/) and got a bug report from a user regarding this issue.
In case you are tring to find out the tzid for the current Windows time zone... The time zone names from GetTimeZoneInformation() are localized. You'd need to find the "Time Zones" registry entry that matches the GetTimeZoneInformation() return value. Then, its registry key name can be used to look up a mapping table. However, different Windows versions use different key names. And some old localized Windows (NT/2000) have localized key names. In that case Java uses the mapID value which is not in Windows XP with a time zone patch and Vista. IIRC, key name "GMT" is used for different time zones in different Windows versions. It's a mess if you try to map Windows time zones to tzids... Masayoshi