Partager via


Bye bye "System.TimeZone2", Hello "System.TimeZoneInfo"

Did I catch your attention? I know I haven't posted anything interesting in a while. I am currently working on a project that is unannouced.

However, I want to let everyone know that in Orcas Beta1, that will be release in a few months, the BCL team decided to rename this new type to "System.TimeZoneInfo". This should come as no surprise to my regular readers. We got a lot of feedback on Krzsyztof's blog, the BCL blog, my blog and the BCL Feedback about the name.

 Though personally, I find that System.TimeZone2 clearly indicates to a new .NET users that System.TimeZone is basically obsolete. I do agree with everyone's feedback that using numeric modifier is not scalable in the long term. It is a tough call, but given the incredible amount of feedback we got. It looks like System.TimeZoneInfo would be a better name. My only hope is that I don't get another flood of feedback from people who loved the System.TimeZone2 name and System.TimeZoneInfo.

We do value your feedback. So, what do you think?

Comments

  • Anonymous
    March 28, 2007
    I think the new name is fine. The other FooInfo classes are pretty expressive and when you see one of those you know you are supposed to use it. Since you will add a bunch of stuff I think that association hints in the right direction in this case. I have a slightly different question. When, if ever, would you consider using the ObsoleteAttribute when doing class library/framework development? Please explain why and the tradeoffs.

  • Anonymous
    March 28, 2007
    Ever since Kathy Kam announced on her weblog that a new type named TimeZone2 will be introduced into

  • Anonymous
    March 29, 2007
    Just wanted to say: Woohoo! Sanity prevails...

  • Anonymous
    March 29, 2007
    I like TimeZoneInfo more, that's the right way to go.  In my own, personal, opinion, the right places to indicate that it supercedes System.TimeZone are in the System.TimeZone documentation and the System.TimeZoneInfo documentation.  

  • Anonymous
    March 29, 2007
    The comment has been removed

  • Anonymous
    March 29, 2007
    I second what tfries said...when intellisense pops up, it is immediately obvious that TimeZone2 is a newer rev than TimeZone.  Whereas TimeZoneInfo...well...upon initial inspection I have no idea how that would differ from TimeZone.  My suggestion is to keep it TimeZone2. -Chyld

  • Anonymous
    March 29, 2007
    Good choice. Moreover, the name TimeZoneInfo is better too: the object itself isn't a time zone, it just provides operations and information for working with time zones, and it fits in nicely with existing Infos like CultureInfo.

  • Anonymous
    March 29, 2007
    Intellisense is a non-issue. This class will be part of a library that will be used in a variety of text editors, none of which have Intellisense except for Visual Studio. While I think that TimeZone2 is not a great name, it is immediately understandable that it replaces TimeZone. I do not get that same understanding from the name TimeZoneInfo. Thus, it is important that the documentation appropriately describes the situation. Also, if it really does supersede TimeZone, then ObsoleteAttribute it. [Off topic] Several months ago I and others talked about a UTC-only DateTime class. If Microsoft will not create it, please enable others to implement it by either unsealing DateTime and / or making DateTime implement an IDateTime interface and updating signatures to use the interface. http://blogs.msdn.com/kathykam/archive/2006/10/05/Designing-System.TimeZone2-2D00-Part-2-2800_Dynamic-Time-Zone-support_2900.aspx

  • Anonymous
    March 30, 2007
    When you said the beta 1 is going to be released ? Thanks

  • Anonymous
    April 19, 2007
    Can you give us a post on exactly what the new DateTime2 class does?

  • Anonymous
    May 02, 2007
    I responded to several MSDN blogs about the disadvantages of naming it TimeZone2 before I discovered that the name has already been changed :) I do agree with tfries that you might have a progression problem with Info; however, I do not believe that problem is any worse than the problems with the 2 suffix. But I would mainly like to say "thank you" to Microsoft for actually listening to the feedback and reversing what was apparently an internally unanimous decision in order to satisfy the community. I participate in the .NET community in a number of ways, including posting suggestions at the feedback center, moderating in the MSDN forums, and reading and commenting on MSDN blogs. Too often I feel like Microsoft takes a "poor little child, let me explain why we are always right and you are always wrong" attitude when confronted with opposition to its design decisions. I am glad that, on this issue at least, that was not the case.

  • Anonymous
    July 04, 2007
    This is thoroughly confusing to me. At first, you go through great lengths explaining why TimeZone2 is the correct class name -- according to the BCL guidelines. By the way: your arguments convinced me... TimeZone2 is definitely much clearer. What is the justification for deviating from the BCL guidelines? How does Anders feel about this? If enough people beg loud and long enough, will it be changed back to TimeZone2? [I don't see how "listening" to feedback is a valid argument to change a class name... people who don't like a name are much more likely to speak up and cast a vote for a new name than are those who agree with the existing name]

  • Anonymous
    April 11, 2008
         Good idea! P.S. A U realy girl?

  • Anonymous
    December 04, 2008
    The comment has been removed