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:

    All problems are finally scientific problems.
    George Bernard Shaw (1856–1950)

    Family life is not a computer program that runs on its own; it needs continual input from everyone.
    Neil Kurshan (20th century)

    Frequently also some fair-weather finery ripped off a vessel by a storm near the coast was nailed up against an outhouse. I saw fastened to a shed near the lighthouse a long new sign with the words “ANGLO SAXON” on it in large gilt letters, as if it were a useless part which the ship could afford to lose, or which the sailors had discharged at the same time with the pilot. But it interested somewhat as if it had been a part of the Argo, clipped off in passing through the Symplegades.
    Henry David Thoreau (1817–1862)