FIX: Visual C++ Gives GP Fault If System Date Past 18-Jan- 2038

ID: Q125494


The information in this article applies to:


SYMPTOMS

When the system clock is set to any date/time after January 18, 2038 at 19:14:07, loading the Visual C++ development environment fails with an application error or 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 Jan 1, 1970. This value is a 32-bit signed integer, so it 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 this to be a bug in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Visual C++, version 6.0.

Additional query words: 2.00 2.10 GPF noupdate


Keywords          : kbenv kbVC600fix kbGrpDSTools 
Version           : 2.00 2.10
Platform          : NT WINDOWS 
Issue type        : kbbug 

Last Reviewed: July 28, 1999