Microsoft KB Archive/125494

From BetaArchive Wiki
Knowledge Base


FIX: Visual C++ gives a GP fault if the system date is past January 18, 2038

Article ID: 125494

Article Last Modified on 5/2/2005



APPLIES TO

  • Microsoft Visual C++ 2.0 Professional Edition
  • Microsoft Visual C++ 2.1
  • Microsoft Windows Media Player 7.0
  • Microsoft Windows Media Player 7.1



This article was previously published under Q125494

SYMPTOMS

When the system clock is set to any date and time after January 18, 2038 at 19:14:07, loading the Microsoft Visual C++ development environment fails with an application error or a general protection (GP) fault, and execution terminates.

CAUSE

The C Run-time (CRT) has a limitation with the time/date functions. Time is measured in seconds from January 1, 1970. This value is a 32-bit signed integer. Therefore, this value has a maximum date of Jan 18, 2038 19:14:07 or 2^31 seconds (2,147,483,648 seconds) from Jan 1, 1970 00:00:00. Because the development environment depends on time/date routines from the CRT, the time functions will fail and cause the error.

RESOLUTION

Make sure that the system date is set correctly before January 18, 2038.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section. This bug was corrected in Microsoft Visual C++, version 6.0.


Additional query words: 2.00 2.10 GPF noupdate time_t struct tm 6.00 runtime HWINFO

Keywords: kbbug kbfix kbvc600fix kbenv KB125494