Microsoft KB Archive/932590

= FIX: Windows-based applications that use the TZ environment variable may not work as expected because of changes to DST =

Article ID: 932590

Article Last Modified on 10/11/2007

-

APPLIES TO


 * The C Run-Time (CRT)
 * Windows Vista Ultimate
 * Windows Vista Enterprise
 * Windows Vista Business
 * Windows Vista Business 64-bit Edition
 * Microsoft Windows Server 2003, Enterprise Edition
 * Microsoft Windows Server 2003, Enterprise x64 Edition
 * Microsoft Windows Server 2003, 64-Bit Enterprise Edition
 * Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
 * Microsoft Windows Server 2003, Standard Edition (32-bit x86)
 * Microsoft Windows Server 2003, Standard x64 Edition
 * Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
 * Microsoft Windows Server 2003, Datacenter x64 Edition
 * Microsoft Windows Server 2003, 64-Bit Datacenter Edition
 * Microsoft Windows Server 2003, Datacenter Edition for Itanium-Based Systems
 * Microsoft Windows XP Professional

-



SYMPTOMS
Microsoft Windows-based applications that use the TZ environment variable may not work as expected because of changes to daylight saving time (DST). Starting in the spring of 2007, the DST start date and the DST end date for the United States will transition to comply with the Energy Policy Act of 2005. DST in the United States will start three weeks earlier (2:00 A.M. on the second Sunday in March) and will end one week later (2:00 A.M. on the first Sunday in November) than in previous years.

In Windows Vista, in Microsoft Windows Server 2003, and in Microsoft Windows XP, when you use the TZ environment variable, the C Run-Time (CRT) localtime function and the CRT _localtime64 function will not correctly recognize DST. These functions will recognize DST as starting on the first Sunday of April and as ending on the last Sunday of October for all dates.

Note If you have an application that uses the Microsoft C runtime (CRT) library, an update may be required. The recent updates for the CRT do not represent a newly discovered effect on products that were already listed in previous product-specific statements from Microsoft. However, the CRT updates are available for developers to update their applications.

If the CRT behavior affects an application, you can help resolve this behavior by installing the updated CRT library.

The CRT update and the Windows operating system update differ in the following ways:
 * The Windows operating system update enables Windows to recognize DST changes correctly by using the new DST rules for 2007. Microsoft generally recommends this update for every user.
 * When applications call CRT libraries after you install the CRT update, the CRT libraries use DST 2007 rules to handle dates correctly. The CRT itself is not an application. A user does not directly interact with the CRT. Instead, the CRT is a DLL that custom applications use.

The cumulative Windows operating system update and the CRT update are unrelated. Neither update resolves a problem that is caused by the other.



Update information
The following file is available for download from the Microsoft Download Center:

Windows Server 2003
Download the WindowsServer2003-KB932590-x86-ENU.exe package now.

Windows Server 2003 for Itanium-based Systems
Download the WindowsServer2003-KB932590-ia64-ENU.exe package now.

Windows Server 2003 x64 Edition
Download the WindowsServer2003.WindowsXP-KB932590-x64-ENU.exe package now.

Windows Vista
Download the Windows6.0-KB932590-x86.msu package now.

Windows Vista for x64-based Systems
Download the Windows6.0-KB932590-x64.msu package now.

Windows XP
Download the WindowsXP-KB932590-x86-ENU.exe package now.

Windows XP x64 Edition
Download the WindowsServer2003.WindowsXP-KB932590-x64-ENU.exe package now.

For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to obtain Microsoft support files from online services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.

Prerequisites
There are no prerequisites to apply this software update.

Restart requirement
You must restart the computer after you apply this software update.

Update replacement information
This software update does not replace any other hotfixes.

File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

Windows Server 2003 Service Pack 2, 64-bit version for Itanium processors


STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



MORE INFORMATION
After you apply this update, applications that have the TZ environment variable set will correctly recognize DST in 2007.

For more information about the TZ environment variable, visit the following Microsoft Developer Network (MSDN) Web site:

http://msdn2.microsoft.com/en-us/library/90s5c885(VS.80).aspx

CRT functions and Microsoft Foundation Classes (MFC) functions that call the localtime function and the _localtime64 function may also be affected by the DST change. The following CRT functions and MFC functions call the localtime function and the _localtime64 function:
 * ctime
 * _wctime
 * _tctime
 * _ctime64
 * _wctime64
 * _tctime64
 * mktime
 * _mktime64
 * _utime
 * _wutime
 * _tutime
 * _utime64
 * _wutime64
 * _tutime64
 * COleDateTime::operator=
 * CTime::GetLocalTm
 * CTime::Format

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Keywords: kbqfe kbpubtypekc kbhotfixserver KB932590

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.