by Michael S. Kaplan, published on 2005/06/01 23:35 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/06/01/424067.aspx
A few days ago I was blathering about time zones, locations, and keyboards and I made the mistake of talking about how all of the various pieces Microsoft needed to integrate these technologies were already present:
And once upon a time, there was some effort to integrate the time zones and user locales as well, but that particular integration no longer really happens -- and it would honestly be better if it integrated with the GEO settings anyway. Especially since there is no documented, queryable mapping between locales and time zones, but a call to the GetGeoInfo function with a SYSGEOTYPE of GEO_TIMEZONES will return an array of all of the time zones in the selected location.
Luckily, one of our two Internationalization MVPs (Mihai Nita) noticed that the emporer had no clothes, and pointed out:
Has anyone seen this working?
Everything works fine except for GEO_OFFICIALLANGUAGES & GEO_TIMEZONES .
Tried it on XP SP2, 2003, Longhorn 5048, compiled with C++ from .NET 2003 and .NET 2005 beta 2. Nothing.
The easyest way to check it:
GetGeoInfo( 244, GEO_TIMEZONES, NULL, 0, NULL );
Returns 0 and GetLastError also 0.
It should return the size needed.
I have also tried providing a huge buffer, and I have tried with all GEOIDs (enumerated).
Now I admit this was not really something I had tried before. I just assumed it worked since the SYSGEOTYPE topic, which documents all of the members of this enumeration:
GEOID of a nation. This value is stored in a long integer.
The latitude of the GEOID. This value is stored in a floating point number.
The longitude of the GEOID. This value is stored in a floating point number.
The ISO 2-letter country/region code. This value is stored in a string.
The ISO 3-letter country/region code. This value is stored in a string.
An RFC1766-style string derived from the locale and GEOID (for nations only).
A locale ID (LCID) derived from the language and the GeoID (for nations only).
The friendly name of the nation. Example: Germany. This value is stored in a string.
The official name of the nation. Example: Federal Republic of Germany. This value is stored in a string.
The time zones associated with the GEOID. These values are stored in an array of IDs.
The official languages of the nation at the GEOID. These values are stored in an array of LCIDs.
did not bother to mention that those last two items have never yet been implemented in any version of Windows.
Mihai is completely correct, here. And the docs should definitely be updated to reflect these limitations.
Anyway, sorry for the misdirection, it was not intentional....
This post brought to you by "M" (U+004d, LATIN CAPITAL LETTER M)
The first letter in the words Mea Culpa!
# Mihai on 2 Jun 2005 12:03 AM:
# Michael S. Kaplan on 2 Jun 2005 1:10 AM:
2005/11/06 Time zones, GEOs, and Percents
2005/10/12 Some of GetGeoInfo is sorta broken
go to newer or older post, or back to index or month or day