Time zones and locations and keyboards, oh my!

by Michael S. Kaplan, published on 2005/05/28 02:03 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/05/28/422808.aspx

Yesterday, Manip post a rant about the fact that the three settings in the title of my post today are not integrated well (in response to a post by Larry Osterman, who gets good comments even to his non-posts!). The rant:

I'm using this misc story to post a rant about Windows Setup.

Why oh why are countries and time zones + keyboard layouts not cross linked?

First Windows Setup asks me my nationality, I respond 'United Kindon'... Setup is *SO* smart that it doesn't change the default time zone to GMT & UK Keyboard Layout; instead I have to manually select all three.

Now I absolutely agree that not *ALL* people who select UK will want to use GMT and a UK keyboard layout but it could at least make those the defaults for the vast majority of the people that do each time...

In case you were thinking that this is proof that you should read the comments in people's posts, this probably wouldn't do the trick, because Larry sent me email about this before I had a chance to look at it. :-)

Now let's talk about this rant for a bit. :-)

Now starting in Windows XP and continuing into Windows Server 2003, a user locale setting will give you a keyboard, automatically. You can choose to add more if you like, or even remove ones automatically added, and with the exception of a single bug that we may hear about in a comment to this very post it all works quite well. Note that in prior versions this feature did not exist, so for Windows 2000 you would actually have to complain about four non-integrated settings!

However, the time zone setting and the location setting are not integrated with that user locale/keyboard choice.

I have spoken in the past (like in GEOID -- The LCIDs maligned little brother....) about the fact that the location and user locale settings are not well integrated, and the fact that not enough people are using the location setting anyway. And the inertia that keeps developers from making such changes is not helped by the fact that the GEO API does not exist on Windows 2000, either. But eventually, with the help of that eager PM I talked about the cited GEO post, I am sure that issue will work itself out.

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.

Note that there are many locations that span multiple time zones, so there will still have to be some tweaking done, but that is not unreasonable (I am sure there are both people who would demand that Microsoft integrate GPS tracking to pinpoint the location and people who would decry such an "evil Microsoft conspiracy" to track users as immoral; I will not give my opinion either way!).

So in summary, not only can the LOCALE/GEO and GEO/TIMEZONE connections can be made, but there are people actively trying to get them made. If Manip can wait until we get all of our ducks in a row, then the integration that the rant truly pines for will happen. Hang in there! :-)


This post brought to you by "±" (U+00b1, a.k.a. PLUS-MINUS SIGN)

# Mike Dimmick on 28 May 2005 9:42 AM:

I can think of two bugs from a UK user's perspective: 1, the Keyboard Layout dialog tells you you can't remove the automatically-added US layout because it's in use. Setup should switch to using the UK layout straight away and allow the US to be removed, or even do so automatically.

2, the culture/location options are prompted for before the time zone. So why are the date and time selectors for setting the time still using US formats, not the UK formats I just told you to use?

I have the feeling I've posted this comment before, but a little reinforcement can't hurt ;-)

# Michael S. Kaplan on 28 May 2005 11:21 AM:

Yes, the first issue you meant is the one I had in mind. The second one is also one I vaguely knew of but I had forgotten about it in the context of the current discussion.

But does the UI pick up the setting in other contexts? I thought it never did, for some reason....

# Mihai on 30 May 2005 1:26 AM:

"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."

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).

Thanks :-)

# Michael S. Kaplan on 30 May 2005 5:08 AM:

Hey Mihai, this one deserves its own post. I'll write about what is going on, soon.

# Manip on 30 May 2005 6:23 AM:

Thanks for the response to my post. I hope it is fixed in the near future (maybe next release?)...

It is just one of those issues that you sit back and say "I know this is going to be fixed in their next release" but that wasn't true for W2K or XP.

If you guys can't get all the bugs sorted out and have to pull it can you at least make a last minute hack for the longhorn setup (database with each country, has time/keyboard settings).

# Michael S. Kaplan on 30 May 2005 7:02 AM:

Like I said Manip, the keyboard is already hooked up to the user locale. The future steps are to see what can be done to hook in the other two settings (time zones and locations).

It is too early to promise when it will happen, but I can promise you that people are looking at the issue, and that it is an important one to several people here.

Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

referenced by

2005/10/12 Some of GetGeoInfo is sorta broken

2005/06/01 It's not quite done yet

go to newer or older post, or back to index or month or day