FIX: Visual C++ .NET 2005 C runtime daylight saving time 2007 update for the TZ environment variable

This article has been archived. It is offered "as is" and will no longer be updated.
If you use the TZ environment variable in Microsoft Visual Studio 2005, the following C runtime (CRT) functions do not recognize daylight saving time (DST) correctly.
  • localtime
  • localtime_s
  • _localtime32
  • _localtime32_s
  • _localtime64
  • _localtime64_s
These functions recognize DST as starting on the first Sunday of April and ending on the last Sunday of October for all dates. These functions do not recognize DST as starting on the second Sunday of March and ending on the first Sunday of November according to the U.S. Energy Policy Act of 2005.

Hotfix Information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

To download this hotfix from the MSDN Code Gallery, visit the following Microsoft Web site:

Note The MSDN Code Gallery displays the languages for which the hotfix is available. If you do not see your language listed, it is because the Code Gallery resource page is not available for that language.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:


You must have Visual Studio 2005 installed before you apply this hotfix.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix 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.
File nameFile versionFile sizeDateTimePlatform
Crtassem.hNot applicable81412-Feb-200711:06Not applicable
Crtdefs.hNot applicable76,35812-Feb-200711:06Not applicable
Libcmt.libNot applicable7,843,03212-Feb-200711:06Not applicable
Libcpmt.libNot applicable5,004,44612-Feb-200711:06Not applicable
Msvcmrtd.libNot applicable1,278,47212-Feb-200716:37Not applicable
Msvcprt.libNot applicable1,482,13212-Feb-200711:06Not applicable
Msvcprtd.libNot applicable1,625,59212-Feb-200711:06Not applicable
Msvcrt.libNot applicable948,19412-Feb-200711:06Not applicable
Msvcrtd.libNot applicable982,79812-Feb-200711:06Not applicable
Msvcurt.libNot applicable6,296,94012-Feb-200716:37Not applicable
Msvcurtd.libNot applicable6,973,79612-Feb-200716:37Not applicable
8.0.50727.805.policyNot applicable85,50412-Feb-200718:37Not applicable
Crtassem.hNot applicable64612-Feb-200711:06Not applicable
Crtdefs.hNot applicable86,40112-Feb-200711:06Not applicable
Libcmt.libNot applicable10,960,08012-Feb-200716:37Not applicable
Libcmtd.libNot applicable13,918,76212-Feb-200716:37Not applicable
Libcpmt.libNot applicable8,206,69412-Feb-200716:37Not applicable
Libcpmtd.libNot applicable6,716,77212-Feb-200711:06Not applicable
Msvcmrt.libNot applicable972,60612-Feb-200711:06Not applicable
Msvcmrtd.libNot applicable1,009,76412-Feb-200711:06Not applicable
Msvcprt.libNot applicable1,959,72012-Feb-200716:37Not applicable
Msvcprtd.libNot applicable2,153,36012-Feb-200716:37Not applicable
Msvcrt.libNot applicable1,174,81012-Feb-200716:37Not applicable
Msvcrtd.libNot applicable1,209,60412-Feb-200716:37Not applicable
Msvcurt.libNot applicable5,969,85212-Feb-200711:06Not applicable
Msvcurtd.libNot applicable6,643,89012-Feb-200711:06Not applicable
Tzset.cNot applicable23,60512-Feb-200711:06Not applicable
Libcmt.libNot applicable7,997,34812-Feb-200716:38Not applicable
Libcmtd.libNot applicable9,947,82612-Feb-200716:38Not applicable
Libcpmt.libNot applicable2,519,53612-Feb-200712:40Not applicable
Libcpmtd.libNot applicable9,321,16812-Feb-200716:38Not applicable
Msvcmrt.libNot applicable1,094,65012-Feb-200716:38Not applicable
Msvcmrtd.libNot applicable1,134,82212-Feb-200716:38Not applicable
Msvcprt.libNot applicable1,512,19012-Feb-200716:38Not applicable
Msvcprtd.libNot applicable1,656,85212-Feb-200716:38Not applicable
Msvcrt.libNot applicable945,22812-Feb-200716:38Not applicable
Msvcrtd.libNot applicable978,78012-Feb-200716:38Not applicable
Msvcurt.libNot applicable6,139,29612-Feb-200716:38Not applicable
Msvcurtd.libNot applicable6,798,91212-Feb-200716:38Not applicable
Libcmtd.libNot applicable9,872,22612-Feb-200711:06Not applicable
Libcpmt.libNot applicable7,237,09012-Feb-200716:38Not applicable
Libcpmtd.libNot applicable11,615,46812-Feb-200716:37Not applicable
Msvcmrt.libNot applicable1,241,08412-Feb-200716:37Not applicable
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
When you use the TZ environment variable, this hotfix changes DST to start on the second Sunday of March and end on the first Sunday of November for dates in 2007 and in later years. For 2006 and for earlier years, DST starts on the first Sunday of April and ends on the last Sunday of October.

Note This hotfix only applies to applications that set the TZ environment variable. For more information about the TZ environment variable, visit the following Microsoft Developer Network (MSDN) Web site: The following CRT and Microsoft Foundation Classes (MFC) functions call the localtime function and the _localtime64 function. These functions may also be affected by this change.
  • ctime
  • _wctime
  • _tctime
  • _ctime64
  • _wctime64
  • _tctime64
  • mktime
  • _mktime64
  • _utime
  • _wutime
  • _tutime
  • _utime64
  • _wutime64
  • _tutime64
  • COleDateTime::operator=
  • CTime::GetLocalTm
  • CTime::Format
For more information, 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

Article ID: 932392 - Last Review: 12/09/2015 09:42:40 - Revision: 4.0

Microsoft Visual Studio 2005 Team Edition for Software Architects, Microsoft Visual Studio 2005 Team Edition for Software Developers, Microsoft Visual Studio 2005 Team Edition for Software Testers, Microsoft Visual Studio 2005 Team Edition for Database Professionals, Microsoft Visual Studio 2005 Standard Edition, Microsoft Visual Studio 2005 Professional Edition

  • kbnosurvey kbarchive kbqfe KB932392