Where has TimeZone2 class gone?

by Miha Markič 6. December 2007 00:58

If you are following blogs about .net 3.5 you might have across this interesting post. It explains the benefits of new TimeZone2 class residing in .net 3.5 System.Core assembly. The best feature of TimeZone2 for me is the ability to convert time from and to different time zones. Perhaps it is worth to mention that dealing with time zones (read: dealing with daylight saving time) is something I would really like to avoid. Unfortunately world leaders don't think so and they are not just keeping up with daylight saving times, oh no, they keep changing the rules often, just to make it worse.

Before TimeZone2 was introduced one had to do the conversion between different time zones manually - as old TimeZone class knows only to transform from/to current time zone (ToLocalTime, ToUniversalTime). So, hura, for new TimeZone2 as described in the post mentioned above. I'll just use it.

<few minutes pass>

Hm, where is TimeZone2? No sign at all of it. Even reflector can't find it. After a little more reflectoring (using clues that TimeZone2 resides in new System.Core dll under namespace System) I've soon found the best new class that resembles the TimeZone2: TimeZoneInfo. Perhaps this change is mentioned somewhere, I just couldn't find it.

To make it short: if you are looking after TimeZone2 you should use TimeZoneInfo instead, the swiss knife like tool for dealing with time zones - this is what TimeZone should be from the beginning.

UPDATE: Here is a post that mentions renaming of TimeZone2.

Tags:

.net 3.5

Comments (3) -

Josh Free
Josh Free
12/6/2007 1:10:21 AM #

Hi Miha,
You're correct, System.TimeZoneInfo was briefly called System.TimeZone2 back in some of the very early .NET Framework 3.5 Beta and CTP releases.

Reply

Justin Van Patten
Justin Van Patten
12/6/2007 1:23:48 AM #

We renamed TimeZone2 to TimeZoneInfo because we received overwhelming feedback from the community against the "TimeZone2" name.

I think we first mentioned the name change in the following blog post:

blogs.msdn.com/.../...-timezoneinfo-josh-free.aspx

Thanks,

Justin Van Patten
CLR Program Manager

Reply

Miha Markic
Miha Markic
12/6/2007 10:31:32 AM #

Josh,

Thanks for confirmation. I've found blog posts about TimeZone2 but none mentioned the renaming.

Reply

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Miha Markic

About me
Righthand
 
Microsoft MVP
 
Developer Express' DXSquad
INETA Country Leader for Slovenia
INETA Country Leader for Slovenia

Slovene Developer Users Group Lead
Friends of Red-Gate
LLBLGenPro Partner

Miha currently works as a free lance consultant and software developer specialized in .net area.
He graduated in Computer and information science at the University of Ljubljana, Slovenia. He has accumulated experience in various programming languages such as Java, Visual Basic 3-6 (MCP), Visual C++, Delphi, C# and VB.Net through years.
He has experience in practically all (technical) stages of project development, including planning, framework development, user interface, business processes, as well as testing and documenting. He has worked on big and small projects in Slovenia and abroad (e.g. participated in completing level 3 IS for the Nucor steel plant, Hertford, USA).
Currently he enjoys programming in .net environment using C#. Since 2000 he has been active in Developer Express' DX Squad and has been ECDL trainer and tester. He also gives lectures on conferences and other events in Slovenia.

Month List

Tag cloud

Most comments

Paulius Paulius
1 comments
us United States
Meh Meh
1 comments
us United States
bart dm bart dm
1 comments
nl Netherlands

RecentComments

Comment RSS