Microsoft Y2K  
Microsoft
 This static CD-based web site is representative of the www.microsoft.com/y2k site as of October 15, 1999.

Microsoft Year 2000 Readiness Disclosure & Resource Center
C Runtime Libraries and the Year 2038 Issue
What is the Year 2038 issue?

To ensure that software programs can communicate with other applications and with hardware on different machines from multiple vendors, software developers write programs according to industry standards.

The root of the year 2038 issue is an industry-standard data type that can only represent dates between 1/1/1970 and 1/18/2038. It is the American National Standards Institute (ANSI) data type known as time_t.

After January 18, 2038, applications that rely on the 32-bit ANSI C time_t data type may not function as expected.

In software programming languages, the data type indicates what sort of value a data object (variable) represents, such as whether it is a floating-point number (one that can contain a fractional part), a character (text), or an integer (whole number).

The ANSI C time_t data type is a signed integer that is stored in 32 bits. The first of these bits is used to represent the sign (for a positive or negative number); the remaining 31 bits are used to store the number of seconds elapsed since January 1, 1970 at 12:00:00 AM GMT.

The maximum number of seconds that can be stored in the time_t value is 2147483647 (that's a little over 68 years). Once a signed integer has reached its maximum value, it wraps around to its lowest possible negative value the next time it is incremented. So at 8 seconds past 3:14 AM on January 19, 2038 the time_t value will wrap around to û2147483648. This represents December 13, 1901 at 8:45:52 PM GMT.

Most, if not all, C applications use 1970 as the reference date and will overflow in 2038. Overflow means that the 31 bits used to hold the numeric representation of the integer can no longer represent the value. This overflow may cause an application to post error messages or reset the date counter to January 1, 1970.

Programs are composed of one or more independently developed modules; each module contains one or more functions. A function is a named section of a program that performs a specific task. The C and C++ programming languages come with a prewritten set of functions (also called routines). This collection of precompiled functions is called a library.

The C and C++ languages rely on library routines for input-output and other interactions with the computer. The Microsoft Visual C Runtime (MSVCRT) library includes several functions that use parameters of time_t. For example: time, ctime, difftime, gmtime, localtime, mktime, and utime.

Most of the support functions that use the time_t data type cannot handle negative values. Also, many of them (for example functions that call for printing or display) may not return an error code. So after January 18, 2038 applications that rely on time_t may not function as expected.

How is time_t related to the "operational range" listed in Microsoft Year 2000 compliance documents?

Time structures in software programs affect a product's operational range. The time_t function is only one of many time structures that can be used in programs.

Microsoft products have a variety of operational date ranges as a result of a number of interoperability/compatibility date structures. The operational range of a product indicates the limits within which the product behaves as functionally intended. Outside these limits the product may or may not continue to function normally, depending on the specific functions being used.

The date handling methods within a software product are tailored to the needed functionality. Various methods (algorithms) can be used depending on the functions required, so each method may extend normal functionality to a different date limit. Examples of various date functionality include valid data ranges the product will accept, valid dates for the file itself, and the date ranges within which the product will initialize.

When programmers use Microsoft development tools, they can choose which application program interfaces (APIs) to include, and some of them have used the C/C++ runtime APIs designed to manipulate time_t values. Custom-coded date handling routines also can be a factor in determining a product's operational range. Developers have continued to include time_t in their applications because it is a convenient way to handle dates and times in C and C++ programs.

The Visual C++/C runtime library contains numerous functions for date and time calculations. For example, the following data types are used in Visual C++:

Data type
Range
Where found
COleDateTime, DATE VARIANT

1/1/100 through 12/31/9999

OLE/COM

time_t / CTime

1/1/1970 through 1/18/2038

C runtime / MFC

struct FILETIME

1/1/1601 through 12/31/58457001 (the number of 100 nanosecond intervals since 1/1/1601 in a 64-bit value)

Windows

struct SYSTEMTIME

1/1/1900 through 12/31/32767

Windows

DOS DateTime

1/1/1980 through 12/31/2108

DOS

The operational range for Visual C++, 1/1/1980 through 1/18/2038, was determined by combining the time_t/Ctime range of 1/1/1970 through 1/18/2038 and the DateTime range of 1/1/1980 through 12/31/2108.

Microsoft's Year 2000 compliance testing is intended to establish the durability of our products' functionality through at least 2035. Even when a Microsoft product is used after the upper limit of its operational range, many/most functions continue to work fine.

Which Microsoft products include the C Runtime library with ANSI standard time_t?

ANSI time functions based on a 32-bit version of time_t are included in the Microsoft Visual C++ Runtime (MSVCRT) library.

The MSVCRT library currently ships with many Microsoft applications, including the following:

  • All Microsoft development tools
  • Windows 9.x, Windows 2000, and Windows NT operating systems
  • Microsoft Access, Excel, PowerPoint, Project, Word, Works, and WinCE products

A very large number of other externally developed PC applications also use time_t.

The Microsoft C Runtime library is a redistributable file and so any application built with Visual C++ can potentially ship with it. However, just because MSVCRT is used doesn't mean that the time functions based on ANSI time_t are used.

Is there any way to know for sure if my applications have the time_t data type?

Source Scans are a way to determine this. The exact roll over behavior will be application dependent. The ANSI standard does not define the behavior of using dates beyond 2038.

Is there a workaround programs that were developed with 32-bit ANSI C time functions?

Not a simple one. As with any software, if you have the source code, you can rewrite it to handle dates beyond 2038.

What is Microsoft doing about the Year 2038/ANSI time standard issue?

Microsoft plans to include an improved version of the time libraries in the next release of Visual C. The new version will be based on a 64-bit time_t data type that can handle dates through 2999.

Because time_t is an ANSI standard, no single software manufacturer has control over its design specifications. Microsoft C and C++ programs use ANSI standard data types to represent dates and times internally.

Many programs use the current time_t standard and if it is changed, applications that rely on the ANSI standard behavior could break. For the near-term, this standard ANSI interface must be left "as is" for compatibility reasons.

A number of 64-bit processors are now available, and hardware vendors are rapidly making the transition from 32-bit to 64-bit architectures. But the year 2038 issue is caused by software. Even if the computer has a 64-bit processor, older 32-bit programs and newer programs with time functions based a 32-bit version of ANSI time_t will still be subject to the 2038 limit. To ensure they can handle dates in the year 2038 and beyond some 32-bit "legacy" applications, such as database management systems running on mainframes or minicomputers, may have to be re-coded and re-compiled.

Programs that use 64-bit time structures will be able to record and manipulate dates until 12/31/2999. By 2038 most programs will be written to run on 64-bit or even 128-bit computers.

Microsoft is already working on a new generation of time structures that will use 64-bits and plans to include an improved version of the time libraries in the next release of Visual C.

For more information

See the following white papers: "ANSI and Visual C++ Libraries," "Visual C++ and the Year 2000," "C++ Standards û What are they? Why are they important?" and "Ctime" for more information.

ALL COMMUNICATIONS OR CONVEYANCES OF INFORMATION TO YOU CONCERNING MICROSOFT AND THE YEAR 2000, INCLUDING BUT NOT LIMITED TO THIS DOCUMENT OR ANY OTHER PAST, PRESENT OR FUTURE INFORMATION REGARDING YEAR 2000 TESTING, ASSESSMENTS, READINESS, TIME TABLES, OBJECTIVES, OR OTHER (COLLECTIVELY THE "MICROSOFT YEAR 2000 STATEMENT"), ARE PROVIDED AS A "YEAR 2000 READINESS DISCLOSURE" (AS DEFINED BY THE YEAR 2000 INFORMATION AND READINESS DISCLOSURE ACT) AND CAN BE FOUND AT MICROSOFT'S YEAR 2000 WEBSITE LOCATED AT http://www.microsoft.com/year2000/ (THE "Y2K WEBSITE"). EACH MICROSOFT YEAR 2000 STATEMENT IS PROVIDED PURSUANT TO THE TERMS HEREOF, THE TERMS OF THE Y2K WEBSITE, AND THE YEAR 2000 INFORMATION AND READINESS DISCLOSURE ACT FOR THE SOLE PURPOSE OF ASSISTING THE PLANNING FOR THE TRANSITION TO THE YEAR 2000. EACH MICROSOFT YEAR 2000 STATEMENT CONTAINS INFORMATION CURRENTLY AVAILABLE AND IS UPDATED REGULARLY AND SUBJECT TO CHANGE. MICROSOFT THEREFORE RECOMMENDS THAT YOU CHECK THE Y2K WEBSITE REGULARLY FOR ANY CHANGES TO ANY MICROSOFT YEAR 2000 STATEMENT. EACH MICROSOFT YEAR 2000 STATEMENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. CONSEQUENTLY, MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. MOREOVER, MICROSOFT DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OR THE RESULTS OF THE USE OF ANY MICROSOFT YEAR 2000 STATEMENT IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY, OR OTHERWISE. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY MICROSOFT OR ITS AUTHORIZED REPRESENTATIVES SHALL CREATE A WARRANTY OR IN ANY WAY DECREASE THE SCOPE OF THIS WARRANTY DISCLAIMER. IN NO EVENT SHALL MICROSOFT OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER REGARDING ANY MICROSOFT YEAR 2000 STATEMENT INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS, PUNITIVE OR SPECIAL DAMAGES, EVEN IF MICROSOFT OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, SO THE FOREGOING LIMITATION MAY NOT APPLY TO YOU. THE INFORMATION CONTAINED IN EACH MICROSOFT YEAR 2000 STATEMENT IS FOUND AT THE Y2K WEBSITE AND IS INTENDED TO BE READ IN CONJUNCTION WITH OTHER INFORMATION LOCATED AT THE Y2K WEBSITE, INCLUDING BUT NOT LIMITED TO MICROSOFT'S YEAR 2000 COMPLIANCE STATEMENT, THE DESCRIPTION OF THE CATEGORIES OF COMPLIANCE INTO WHICH MICROSOFT HAS CLASSIFIED ITS PRODUCTS IN ITS YEAR 2000 PRODUCT GUIDE, AND THE MICROSOFT YEAR 2000 TEST CRITERIA.

ANY MICROSOFT YEAR 2000 STATEMENTS MADE TO YOU IN THE COURSE OF PROVIDING YEAR 2000 RELATED UPDATES, YEAR 2000 DIAGNOSTIC TOOLS, OR REMEDIATION SERVICES (IF ANY) ARE SUBJECT TO THE YEAR 2000 INFORMATION AND READINESS DISCLOSURE ACT (112 STAT. 2386). IN CASE OF A DISPUTE, THIS ACT MAY REDUCE YOUR LEGAL RIGHTS REGARDING THE USE OF ANY SUCH STATEMENTS, UNLESS OTHERWISE SPECIFIED BY YOUR CONTRACT OR TARIFF.
 

Last updated August 23, 1999
1999 Microsoft Corporation. All rights reserved. Terms of use.

This site is being designated as a Year 2000 Readiness Disclosure and the information contained herein is provided pursuant to the terms hereof and the Year 2000 Information and Readiness Disclosure Act.