Devlico.Us
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @devlicious

Stephen Wright

My blog about ASP.NET programming in an enterprise environment and the challenges faced by programmers, project managers and clients.


Time Zone Issues

Sounds like a book title, doesn't it?  It's a horror story. 

Currently, I'm using a class library that uses the Windows Registry to return information about a specific date.  I found it on Code Project and it REQUIRED a full trust environment. Luckily, I didn't need to run in a shared hosting environment and I didn't want to build my own DST provider for every time zone.  I've been using it for about 2 years now and I think it's time to move over to the new TimeZone2 functionality that will be included in the .NET Framework 3.5 release.

Kathy Kam, member of the BCL Team, says from a post a while ago:

In the “Orcas” September CTP, you’ll see that the BCL team has added a new class named “System.TimeZone2” that will allow you to:

  • Convert a DateTime from one time zone (not necessarily your machine’s time zone) to another
  • Get an object that describes your local time zone
  • Get an array of objects that describes all the available time zones on your machine
  • Serialize a time zone into a string
  • Create your own time zone object to represent any custom time zones

The best part about this is that… if you are on an Vista machine… all of those functionality will have Vista’s Dynamic Time Zone support, because our calculations are done with the time zone data available on your OS.

This is wonderful news for me.  I no longer have to depend on the old class library to store my time zone information.

For more information on the TimeZoneInfo Class, you can read about it on the MSDN site.


Published Nov 15 2007, 02:37 AM by Stephen Wright
Filed under:

Comments

Hosting news » Time Zone Issues said:

Pingback from  Hosting news » Time Zone Issues

# November 15, 2007 5:12 AM

Headlandyaw.Com » Time Zone Issues said:

Pingback from  Headlandyaw.Com » Time Zone Issues

# November 16, 2007 1:17 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Stephen Wright

I'm a web developer for a small e-learning company. I specialize in building enterprise web applications and am currently working on a Learning Management System (using AICC and SCORM standards). I'm 30, live in Naperville, IL and enjoy watching and playing ice hockey (and of course, coding). Check out Devlicio.us!

Our Sponsors

Red-Gate!

Proudly Partnered With