Daylight Savings Time changes and .Net

Congress, in its infinite wisdom, passed a law last year changing the dates for the change over for Daylight Savings Time for the United States. By sheer fact of the number of business relationships between the two neighboring countries, Canada was forced to follow suit. Needless to say this change can cause issues with time operations for applications. Microsoft is attempting to mitigate the issue with some updates to the OS and KB articles around changes to the APIs.

Here is a link to an article online about the change and mobile devices: http://www.microsoft.com/windowsmobile/daylightsaving/default.mspx

Here is the content of an email sent out by Microsoft complete with links for more information:


Dear Valued Microsoft Customer,

In 2005, the United States government passed the Energy Policy Act of 2005. This act changes the start and end dates for Daylight Saving Time (DST) as of spring 2007. These changes may impact the way applications run. Microsoft is releasing an update for Windows through Microsoft Update that reflects these changes.

Developers who use the .NET Framework may find their applications affected if the application uses the time zone information for historical purposes or if they have derived custom classes from System.TimeZone to provide custom time zone information. The standard System.TimeZone class provides a managed wrapper for the underlying Windows Operating System time zone functions.

In addition, developers who use Visual C++ may find their applications affected if they use the CRT time functions, or the TZ environment variable. Microsoft is currently working on a fix for this issue and will post information about its availability on the Visual Studio Support page.

Most applications that use these affected classes will not need to be modified as this update will ensure that the correct data is provided seamlessly to the application. However, applications that use these classes or the underlying Windows API to perform historical time look-ups will need to be modified.

In most cases, developers who have extended the .NET Framework’s time zone support by creating custom time zone classes derived from System.TimeZone, or by direct access to the Win32 API, will not have to update their applications as long as the available updates to the operating system are applied. However, solutions that rely on private time zone data, or that retrieve system time zone information by accessing the registry directly, may need to be updated. Applications that deal with historical time zone data may also need to be updated.

Microsoft advises all developers who make use of time zone data to test their applications against this update to ensure that their applications function correctly.

For more detailed information and the latest updates please visit http://msdn2.microsoft.com/en-us/vstudio/bb264729.aspx, Preparing for daylight saving time changes in 2007, and KB928388: 2007 time zone update for Microsoft Windows operating systems.

Further Assistance

Microsoft values your business.  For more information visit http://www.microsoft.com/dst2007, or contact Microsoft for assistance.  A list of phone numbers is located at http://support.microsoft.com.  Microsoft Premier Customers may engage their Technical Account Manager directly.