Epoch (reference Date) - Computing - Problems With Epoch-based Computer Time Representation

Problems With Epoch-based Computer Time Representation

Computers do not generally store arbitrarily large numbers. Instead, each number stored by a computer is allotted a fixed amount of space. Therefore, when the number of time units that have elapsed since a system's epoch exceeds the largest number that can fit in the space allotted to the time representation, the time representation overflows, and problems can occur. While a system's behavior after overflow occurs is not necessarily predictable, in most systems the number representing the time will reset to zero, and the computer system will think that the current time is the epoch time again.

Most famously, older systems which counted time as the number of years elapsed since the epoch of January 1, 1900 and which only allotted enough space to store the numbers 0 through 99, experienced the Year 2000 problem. These systems (if not corrected beforehand) would interpret the date January 1, 2000 as January 1, 1900, leading to unpredictable errors at the beginning of the year 2000.

Even systems which allocate more storage to the time representation are not immune from this kind of error. Many Unix-like operating systems which keep time as seconds elapsed from the epoch date of January 1, 1970, and allot timekeeping enough storage to store numbers as large as 2 147 483 647 will experience an overflow problem on January 19, 2038 if not fixed beforehand. This is known as the Year 2038 problem. A correction involving doubling the storage allocated to timekeeping on these systems will allow them to represent dates more than 290 billion years into the future.

Other more subtle timekeeping problems exist in computing, such as accounting for leap seconds, which are not observed with any predictability or regularity. Additionally, applications which need to represent historical dates and times (for example, representing a date prior to the switch from the Julian calendar to the Gregorian calendar) must use specialized timekeeping libraries.

Finally, some software must maintain compatibility with older software that does not keep time in strict accordance with traditional timekeeping systems. For example, Microsoft Excel observes the fictional date of February 29, 1900 in order to maintain compatibility with older versions of Lotus 1-2-3. Lotus 1-2-3 observed the date due to an error; by the time the error was discovered, it was too late to fix it—"a change now would disrupt formulas which were written to accommodate this anomaly".

Read more about this topic:  Epoch (reference Date), Computing

Famous quotes containing the words problems, computer and/or time:

    The problems of the world, AIDS, cancer, nuclear war, pollution, are, finally, no more solvable than the problem of a tree which has borne fruit: the apples are overripe and they are falling—what can be done?... Nothing can be done, and nothing needs to be done. Something is being done—the organism is preparing to rest.
    David Mamet (b. 1947)

    The archetype of all humans, their ideal image, is the computer, once it has liberated itself from its creator, man. The computer is the essence of the human being. In the computer, man reaches his completion.
    Friedrich Dürrenmatt (1921–1990)

    It would be as wise to set up an accomplished lawyer to saw wood as a business as to condemn an educated and sensible woman to spend all her time boiling potatoes and patching old garments. Yet this is the lot of many a one who incessantly stitches and boils and bakes, compelled to thrust back out of sight the aspirations which fill her soul.
    Sarah M. Grimke (1792–1873)