Y2038.COM
THE Place for Y2038 Information and Help
Y2038 Countdown:
(yy:dd:hh:mm:ss)


Home   Reviews   Links   Contact Us



Y2038 Frequently Asked Questions (FAQ)
Have a Y2038 question you'd like answered? Email faq@y2038.com

What is Y2038?
What is the origin of Y2038?
How does Y2038 relate to Y2K?
What are the major technical areas in which Y2038 issues may exist?
How big is Y2038? How much will it cost to prepare for Y2038?
What’s the worst that could happen?
Why haven’t I heard about Y2038 before?
I’ll be retired or dead by the year 2038. Why should I care about Y2038?
Won’t most computers have “64-bit” CPUs way before 2038?
Will buying all new Y2038-compliant hardware and software before 2038 avoid any issues?
I’m a programmer. How do I make my code Y2038-compliant?
What programming languages are affected by Y2038?
Can I just recompile my 32-bit program on a 64-bit compiler to fix the problem?
How much of my code will likely be affected by Y2038?
Are there any software tools that can help with finding and correcting Y2038 issues?
Are there any other roll-over dates to be concerned with?
Where can I find other Internet sites that focus on Y2038 issues?
What services does y2038.com offer?

What is Y2038?

Y2038 refers to an issue that exists because of the way time is fundamentally represented on most computers.

Most software uses time in one way or another. Software might do something simple, like display the current time, or something more complex, like time a chemical process in a manufacturing plant. To get the current time, a software program typically makes a call to the 'time()' function in C/C++, or a similar function in other languages. The value returned by this function is most commonly a 32-bit signed integer representing the number of seconds since Jan 1, 1970 (this date is often referred to as the 'epoch'). The problem is that the range for the 32-bit signed integers is limited. Dates and times beyond early 2038 (exactly 3:14:07 AM GMT on January 19,2038), cannot be represented because the number of seconds since the epoch will exceed the largest positive value that can be held by a 32-bit signed integer.

This could potentially cause problems with any non-Y2038-compliant systems and software that use time. For example, the Y2038 issue may cause errors in forward-looking software, such as mortgage and interest calculations, long before the year 2038. In fact, software that calculates 30-year mortgages could have problems as early as January 2008.

To help further understand the issue, a brief computer science lesson is useful. The binary representation of an integer is a series of bits, and each bit is either 0 or 1. For example, a three-bit integer can contain 2*2*2=8 unique bit patterns: 000, 001, 010, 011, 100, 101, 110, and 111. If the three bits represent an unsigned integer, the values represented by the bits are simply 0, 1, 2, 3, 4, 5, 6, and 7, so the range is 0 to 7. Note that if one is added to 7, the resulting value "wraps" back around to 0. In other words, 7 + 1 = 0.

In order to represent negative numbers, computers use something called "2's complement". This representation uses one bit for the sign of the number, so the magnitude of the range is halved. For the example above, the values of the 8 unique bit patterns in 2's complement are: 0, 1, 2, 3, -4, -3, -2, and -1, in that order. Note that the range in this case is -4 to 3. Also note that if one is added to 3 in 2's complement math (with 3-bit signed integers), the resulting value is -4. In other words, 3 + 1 = -4! The result has 'wrapped' from the most positive value to the most negative value just by adding 1.

Extending this example to 32-bit integers, the range of 32-bit signed integers is -2,147,483,648 to 2,147,483,647. When a 32-bit signed integer represents a number of seconds, the amount of time that can be represented is approximately +/- 68 years, 19 days. Adding that to Jan 1, 1970, you get 3:14:07 AM on Jan 19, 2038. After this time, the largest number of representable seconds will be exceeded, causing a 2's complement wrap condition.

What will happen then? Depending on the specific implementation of a given system's time function and the way the time value is used by the requesting software, the value returned may be interpretted as the epoch (Jan 1, 1970), or perhaps Dec. 1901 (Jan 1, 1970 - 68 years, 19 days). The software may then display the wrong time, write the wrong value to a database, crash, or fail in other subtle (or not so subtle) ways which really depend on the way the time value is used by the software.

The vast majority of computers that exist today are not Y2038-compliant and will likely have some problems related to Y2038. This includes computers running Microsoft Windows, Linux, UNIX, and Apple computers running OSX and later. There are a few exceptions. Apple Macs running OSX OS versions prior to OSX use a 32-bit unsigned integer for time and a starting date of Jan 1, 1904. Thus, these Macs are generally unaffected by Y2038. However, these Macs have a similar problem associated with Feb 6, 2040 at 6:28:15 AM.

Y2038 does not affect 64-bit computers running 64-bit operating systems and properly written 64-bit applications. Y2038 also does not affect applications that do not use time in any way. Using a 64-bit operating system (such as 64-bit Windows XP, 64-bit Linux, or Apple Mac with OSX), can still have issues if applications are improperly written.

What is the origin of Y2038?

When UNIX was first being written back around 1970, engineers at AT&T/Bell Labs needed a function for the current time, so they wrote such a function (called "time") which returned the current time as the number of 1/60th second intervals since Jan 1, 1971. The UNIX time function initially wrapped around after 2.5 years, but it was patched several times, after which it took its most enduring form, returning a 32-bit signed value holding the number of seconds since Jan 1, 1970.

You might wonder why 32-bits was chosen to represent time instead of 64-bits. After all, there's no technical reason why the UNIX designers couldn't have initially chosen 64-bits. Basically, the main reason was hardware cost. At the time, computers were extremely expensive, so limiting the representation of time to 32 bits seemed acceptable. In retrospect, it was clearly not the best choice. Those early designers surely must not have realized the trouble they were going to cause their grand-children. Either that, or they had a very warped sense of humor.

As the saying goes, the rest is history. AT&T/Bell Labs UNIX became a de facto standard, and most major vendors in the computer industry adopted the same representation of time as AT&T UNIX. These included all UNIX platforms, 32-bit Linux, the IBM PC, DOS, all versions of Windows (prior to 64-bit versions), and all compilers and other tools that support these platforms.

How does Y2038 relate to Y2K?

Y2K refers to the easily understood issue of the rollover from 1999 to 2000, whereas Y2038 is an issue with the binary representation of time itself. Y2K and Y2038 are similar in some respects. The same set of situations where Y2K was an issue will also be an issue for Y2038. Y2K was expensive and time-consuming to correct, and Y2038 will be as well. Unfortunately, most Y2K issues were addressed without fixing Y2038 issues. Thus, even software that was certified for Y2K will need to be re-certified for Y2038.

What are the major technical areas in which Y2038 issues may exist?

Potential issues exist anywhere that a 32-bit signed time value may be used. These include (but are not limited to):
-Computer hardware
-Internal and external peripheral components
-Firmware/BIOS
-Operating systems
-File systems
-Device drivers
-Application software
-Databases
-Communication protocols
-Embedded systems, such as satellites, airplanes, automobiles, cell phones, TVs, etc.

How big is Y2038? How much will it cost to prepare for it?

Y2038 is an extremely large and complex problem! One way to estimate the magnitude of Y2038 is to use Y2K as a basis. Some estimates for the total worldwide amount spent preparing for Y2K are over $1 trillion USD. Consider that Y2K affected the earliest 30 years of the Digital Age. Y2038 will mostly affect the second set of 30 years of the Digital Age (assuming all products sold after 2030 will be Y2038-compliant). There will be several orders of magnitude more computers, software, etc. put into service from 2000-2030 compared to 1970-2000. Thus, it follows that the amount required to prepare for Y2038 will be at least several times larger than Y2K. Taking into account inflation as well, the total worldwide cost of preparing for Y2038 will easily exceed $10 trillion USD.

What’s the worst that could happen?

The worst-case Y2038 scenarios are more or less the same as the worst-case scenarios predicted for Y2K. In fact, the chances of catestrophic events are much greater for Y2038 than Y2K since Y2038 is fundamental to the representation of time within computers, whereas Y2K was mostly just an issue of time interpretation by humans. Electric power plants could go off line. Cars may not start or behave irratically. Global communication could come to a halt. The Internet could entirely or partially stop working. Satellites may cease to function and possibly fall out of orbit. Many embedded devices may malfunction. The use of 32-bit time values stored in databases could easily cause a fair amount of confusion until the problems are resolved. Fortunately, there is plenty of time left to address these issues.

Why haven’t I heard about Y2038 before?

There may be several reasons. One reason is of course that the Y2038 event seems so far off.  Being around 30 years away, there is no sense of immediate urgency to fix anything.  However, it is worth noting that forward-looking programs such as mortgage software performing 30-year interest calculations may begin having problems in January 2008, since this marks the 30-year precursor to the Y2038 event.

Another reason you may not have heard about Y2038 is probably due to the extensive media coverage that preceded Y2K.  Perhaps in part due to the heightened awareness, the Y2K issue was almost fully mitigated prior to Jan 1, 2000.  When Jan. 1, 2000 arrived, there were no catastrophes, and there was a public sense that the Y2K event had been over-hyped. In fact, it is likely that the extensive media coverage for Y2K forced businesses to completely address it.

Yet another reason may be a general lack of understanding of Y2038.  Y2K was fairly easy to understand, but Y2038 requires a deeper understanding about the digital representation of time in computers.

I’ll be retired or dead by the year 2038.  Why should I care about Y2038?

Crazy as it sounds, this topic comes up a lot when discussing Y2038. There are many reasons to care about Y2038. For one, our children and grandchildren will hopefully be very much alive in 2038. Surely we should care about the future for their sake. Consider how shortsighted our generation (and our parents and grandparents for that matter) will seem to our children when they are faced with the staggering task of addressing Y2038.

Won’t most computers have “64-bit” CPUs way before 2038?

Indeed, indications are that most new desktop and laptop PCs sold by 2015 will contain 64-bit CPUs.  Some high-end PCs, servers, and workstations sold today already use 64-bit CPUs.  But the computer CPU is only one part of the Y2038 issue.  PCs using 64-bit CPUs will still be capable of running 32-bit software which may not be Y2038-compliant. Even 64-bit software may not be Y2038-compliant.   In addition to the computer hardware, its operating system software, and the application software running on it, there are also potential Y2038 issues with peripheral hardware, device drivers, file systems, databases, communication protocols, web content, and embedded systems. 

It is also important to consider that most of the trillions of embedded systems that will exist by 2038 will still be using 32-bit (or less) CPUs due to many factors, particularly the higher cost and complexity of 64-bit CPUs. Regardless of CPU type, many embedded systems will not experience any significant Y2038 glitches, but many others will.

Will buying all new Y2038-compliant hardware and software before 2038 avoid any issues?

Purchasing new hardware/software is a pragmatic step of an overall Y2038 strategy, but there will still be many legacy issues to deal with, such as existing databases with binary 32-bit data fields for time.

Most vendors of computer-related hardware and software should certify all of their products as Y2038-compliant. The best type of certification is when vendors state explicitly how long a product will run properly. For example, 'Y10K Compliant' would mean no date problems through at least the year 10,000.

I’m a programmer.  How do I make my code Y2038-compliant?

Moving to Y2038-compliant 64-bit hardware platform and tools is the first step. This should provide a 64-bit time_t, as well as the time functions that work with it. Y2038-compliant versions of any third-party libraries must also be obtained.

All source code must be carefully checked for all uses of time_t variables. Any assignments of time_t variables to 32-bit variables must be changed to 64-bit variables. Every usage of these variables must be traced throughout the code. This can be a tedious process, especially when the variables are global. Software tools will ease the conversion process somewhat, but ultimately, all changes should be reviewed. The modified software should be fully tested to verify functionality.

One website details an approach referred to as pivotal time, described here. This technique assumes the current time will wrap back to 1901, but is interpretted to mean +/- 68 years from the actual time. This technique has advantages and disadvantages, and is not appropriate for all situations.

A difficult aspect of addressing the Y2038 issue is that most hardware and software tool vendors do not yet provide 64-bit time-compatible library functions. Or if they do, the 64-bit tools are more expensive than the equivalent 32-bit tools. Of course, you can petition your vendor(s) to provide the hardware and software products you need, or you can consider changing platforms to one that is Y2038-compliant.

You might notice that using 64-bits to hold seconds is actually quite wasteful since the maximum value held in a 64-bit signed quantity is around 292 billion years, which is quite a few times the age of the universe. Practically speaking, it would be much more useful to have the 64 bits represent a time value for the number of milliseconds or microseconds since the epoch with 64-bits. A 64-bit signed value in milliseconds can hold approx. +/- 292 million years, while a 64-bit signed value in microseconds can hold approx +/- 292,000 years.

It would also be convenient if the epoch were to be redefined as midnight on Jan. 1, 0000. However, since these modifications would require changing solidly established industry standards (not to mention even more extensive coding changes), such improvements will most likely not be broadly accepted.

What programming languages are affected by Y2038?

Every programming language is affected by Y2038. While "C" was the initial computer language in which the problem was introduced, most other programming languages adopted the same representation for current time. (If you know of any programming language that is unaffected by Y2038, please let us know!). Actually, most computer languages follow the conventions established on a given platform. For example, Mac applications (prior to OSX) are susceptible to the Mac's Y2038-like issue in the year 2040, regardless of the language used to write the application.

Can I just recompile my 32-bit program on a 64-bit compiler to fix the problem?

Maybe, maybe not. It depends on the nature of the program. The chance of simply recompiling a program to fix the Y2038 issue is remote.

How much of my code will likely be affected by Y2038?

Of course, the answer is highly dependent on the software in question. Software that uses time extensively will obviously require more changes than software that doesn't use time as much. As a rough guideline, it has been estimated that ~6% of all source code needed to be reviewed for Y2K issues. The percent of source code that may be affected by Y2038 should be around the same, or slightly higher.

Are there any software tools that can help with finding and correcting Y2038 issues?

Based on the shear magnitude of Y2038, many tools will undoubtedly be marketed. Programmers should approach such tools with discretion since there will undoubtedly be vendors that try to take advantage of the fear, uncertainty, and doubt about Y2038 in order to make a quick profit with sub-standard or worthless tools. We intend to review as many Y2038-related products as possible and keep an up to date list with reviews here.

Are there any other roll-over dates to be concerned with?

Yes. Apple Mac computers running versions of the Apple MacOS prior to OSX will have a time rollover similar to Y2038 on February 6, 2040. The date is different than Y2038 because the MacOS uses a different epoch (Jan 1, 1904) and 32-bit unsigned value for time, rather than a signed value. There is also an issue with the Network Time Protocol (NTP) which has a rollover in 2036. The rollover of NTP could affect operation of the Internet and serve as a last-chance call to action for Y2038.

Where can I find other Internet sites that focus on Y2038 issues?

Other than simply doing Google or other search engine searches, we maintain a links page here.

What does y2038.com offer?

The mission statement of y2038.com is:
"y2038.com" collaborates with our customers to help fully prepare for the unique problems and challenges associated with the massive Y2038 issue. We strive to offer the highest quality Y2038-related consulting services available, encompassing a broad range of technologies that are vulnerable to Y2038.

y2038.com strives to:
-Provide help to companies that are in need of assistance with Y2038.
-Provide the most up-to-date news and information on Y2038.
-Provide technical tips and suggestions for programmers.
-Maintain a list of external resources and links related to Y2038.
-Review Y2038 software tools and products as they become available.

y2038.com offers a number of Y2038-related services to businesses, including:
Risk Assessment - We help assess your level of exposure to Y2038.
Mitigation Planning - We help formulate an action plan for Y2038.
Supplemental Tech Staff - We provide on-site or off-site technical staffing.
Compliance Certification - We help obtain Y2038-compliance certification.
Seminars/Training - We provide Y2038-related training classes and seminars.
Legal Consulting - We provide domain expertise for Y2038-related litigation.
Media Reference - We provide Y2038 information to all forms of media.
To contact us about these services, please email info@y2038.com.

All information on this website is Copyright (C) 2000-2008, y2038.com. All rights reserved.