A computer bug generates excitement over the possible end of UNIX-based systems in 30 years. A computer bug similar to the Y2K bug is expected to affect UNIX-based systems by the year 2038. The bug, known as the "2038 bug," is

a threat to UNIX where time is kept in a 32-bit variable which will reach its maximum in January 2038. Times beyond this moment will "wrap around" and be represented by a negative number. This means that programs will fail since they will see these times not in 2038 but rather in 1901 resulting in flawed calculations and, ultimately, disaster.

Project 2038, a site dedicated to 2038 preparedness, offers advice for programmers:

Test mission-critical code well ahead of time with utilities, such as FakeTime Preload Library.
Follow programming recommendations from The Open Group (formerly X/Open).
If you are working with Open Source code, this free library may be a useful reference for patching existing code for high-accuracy long term time calculation.
Read the Solutions to the Year 2000 Problem by Steve Manley. Many of his suggestions can be applied to the 2038 problem.
For more general applications, just using large types for storing dates will do the trick in most cases

Newer versions of UNIX and Linux ported to 64-bit or 124-bit platforms may be immune to the 2038 bug, but there’s no easy fix.

Example showing how the date would reset (at 03:14:08 UTC on 19 January 2038):

“Even if every PC in the year 2038 has a 64-bit CPU, there will be a lot of older 32-bit programs running on them. And the larger, more complex, and more important any program is, the better are its chances that that it'll be one of these old 32-bit programs” warns programmer Robert M. Wilcox.

Fortunately, software programmers still have 30 years to find a solution or replace systems vulnerable to the bug.

By Kathleen Clark
For comments on this article,
email us at editorial@atelier-us.com