Time zones make me cringe

Sorting it all Out
Michael Kaplan's random stuff of dubious value
Be sure to read the disclaimer here first!

Time zones make me cringe

  • Comments 17

I did talk about a particular time zone issue earlier today....

And I see that Anthony posted about a new sample using managed code on the BCLTeam blog.

There is one bit there that I swear makes me cringe every time someone mentions it:

The single most requested individual feature for the Base Class Libraries that has not been delivered yet is for support for Time Zones other than Local and UTC. This is a feature we are actively exploring for the next release of the .NET Framework.

My cringe is in part inspired by the explanation from Raymond Chen of Why Daylight Savings Time is non-intuitive. Every time one of those .NET vs. Win32 compatibility issues raises its head I get nervous, so this one that keeps popping heads up lik a hydra can be quite cringe-inspiring.

The other part that makes me nervous is the sample itself -- seems like no Win9x support (the Win9x registry key is different, something the VB sample in my book took care of), and also seems like it has no support for the Vista updates that support the localized time zone name strings, though of coursed that is not yet in shipping product (I figure a sample could try to be either forward or backward compatible!).

As an aside -- that Vista fix with the time zone names is similar to the one done for keyboard layout names in Windows XP to get them out of the registry too; I'll talk more about this another day for both keyboards and time zones. Incidentally, that keyboard fix is one that the 1.0 and 1.1 versions of .NET did not pick up but I believe the issue was addressed in 2.0....

I should probably stop worrying so much, it's not like the sample can't be updated. And there is plenty of time for the right thing to happen in product....

But I wonder why nothing can ever be easy with time zones. :-(

 

This post brought to you by "" (U+0f16, a.k.a. TIBETAN LOGOTYPE SIGN LHAG RTAGS)

Comment on the blather
Leave a Comment
  • Please add 3 and 6 and type the answer here:
  • Post
Blog - Comment List
  • I agree with you. Seem like time anywhere other than home has always been wacky. Maybe someday when we refer to it as Stardate we will have solved that problem. I never knew of Spock and Kirk having trouble thinking about what time it was. Then again in space, what did it matter.
  • In the Star Trek: TOS pilot (the cage), Kirk says it is "stardate 1329.8."  Then... LATER... Kirk says it is "stardate 1329.1"

    "Fall back," perhaps?

    Also see: http://www.straightdope.com/classics/a3_367.html
  • Hmmm... William Shatner was not in The Cage -- he was not in Star Trek until the second pilot. Maybe you meant Jeffrey Hunter, playing Captain Pike? :-)
  • Sorry, wrong episode... it was "Mudd's women"
    http://www.ditl.org/datarticle.php?3
  • How would you do this?

    With the recent event in Australia (Commonwealth Games), Microsoft had to roll-out an update to amend the timezone schedule for 2006. This was a pain, since that subsequently screwed up any applications (eg. Outlook) that seem to store everything in GMT.

    Would you, in this scenario, have to roll-out this patch to all Windows computers world-wide?

    I think the solution for Outlook is to store the time in a timezone format (ie. time+TZ identifier). This way when the timezone moves (they do), the time moves with it. I think .NET has a good head-start on that.
  • It also doesn't support the new "multi-year variable DST start/end" format coming in Vista (necesary for countries like Israel where the cutover date is based in part on the lunar calendar). Those registry key formats are not contractual, and Vista is going to change the rules.
  • Indeed -- one of the core problems with any group in Microsoft that goes off to solve a problem when they don't own the actual area they are trying to solve. :-(

    Luckily for all of us, Vista ships before whatever version of the .NET Framework would have this addition, so there may be time to force the right thing to happen....
  • Damn this round planet!
  • > multi-year variable DST start/end

    Uh-oh.  What's going to happen next year when DST starts early and ends late in the US?? (Stupid Energy bill...)
  • Fil Mackay has an excellent point, one that I will be blogging about soon....

    Though there was also one incorrrect point -- .NET does not have a head start on any solution here -- its notion of UTC v. local time is no different than the Win32 one.
  • Hi Maurits --

    I'll be blogging about the US DST changes soon -- why they are a really bad idea overall, though why I think they may finally force products like Outlook to do  things correctly....
  • I was admittedly being as bit glib when I posted about the Sri Lanka time zone shift when I said:
    ...
  • Earlier today I talked about Getting the real (localized) name of the keyboard.
    In that post, I talked...
  • One of the problems about time zones (and believe me, there are many problems with time zones!) is that...
  • Over on the BCLTeam blog, Anthony Moore has posted Time Zone Scenario Feedback Wanted.
    Now I have mentioned...
Page 1 of 2 (17 items) 12