Time formatting and storage bugs

Time formatting and storage bugs

In computer science, time formatting and storage bugs are a class of software bugs which may cause time and date calculation or display to be improperly handled. These are most commonly manifestations of arithmetic overflow, but can also be the result of other issues. The most well-known consequence of bugs of this type is the Y2K problem, but many other milestone dates or times exist that have caused or will cause problems depending on various programming deficiencies.

GPS date rollover

In the last few months before the year 2000, two other date-related milestones occurred that received less publicity than the then-impending Y2K problem.

The first problem was related to GPS devices: GPS dates are expressed as a week number and a day-of-week number, with the week number transmitted as a ten-bit value. This means that every 1,024 weeks (about 19.6 years) after January 6, 1980 (the GPS epoch), the date resets again to that date; this happened for the first time on August 21, 1999.cite news
author = Janis L. Gogan
title = Applications To The Nines
url = http://www.informationweek.com/747/47uwjg.htm
work = InformationWeek
date = August 9, 1999
accessdate = 2008-01-21
] To address this concern, modernized GPS navigation messages use a 13-bit field, which only repeats every 8,192 weeks (157 years), and will not return to zero until near the year 2137.

9/9/99

The second pre-Y2K milestone occurred in the following month. In many programs or data sets, "9/9/99" was used as a code value to indicate either an unresolved date or as a terminator to indicate no further data was in the set. This raised issues when the actual date this represents, September 9, 1999, actually arrived.

Two-digit year representations

Followon problems caused by certain temporary fixes to the Y2K problem will crop up at various points in the 21st century. Some programs were made Y2K-compliant by continuing to use two digit years, but picking an arbitrary year prior to which those years are interpreted as 20"xx", and after which are interpreted as 19"xx".

For example, a program may have been changed so that it treats two-digit year values 00-68 as referring to 2000 to 2068, and values 69-99 as referring to 1969 through 1999. [ [http://www.opengroup.org/onlinepubs/000095399/utilities/date.html date - write the date and time] , The Open Group Base Specifications Issue 6. IEEE Std 1003.1, 2004 Edition] Such a program will not be able to correctly deal with years beyond 2068.

For applications wanting to calculate the birth year (or other passed year), such an algorithm has long been used to overcome the Year 1900 problem, but it has failed to recognise people over 100 years old.

Year 2011 in Taiwan

Taiwan (known formally as the Republic of China) officially uses the Minguo calendar, which considers the Gregorian year 1912 to be its year 1. Thus, the Gregorian year 2011 will be the ROC year 100, its first 3-digit year. [ [http://pinyin.info/news/2006/taiwans-y1c-problem/ Pinyin news » Taiwan’s Y1C problem ] ]

Year 2038

The original implementation of the Unix operating system stored system time as a 32-bit signed integer representing the number of seconds past the Unix epoch: midnight UTC, January 1, 1970. This value will roll over on January 19, 2038. This problem has been addressed in most modern Unix and Unix-like operating systems by storing system time as a 64-bit signed integer, although individual applications, protocols, and file formats will still need to be changed as well.

Years 2127 and 2255

The SPD EEPROM on modern computer memory modules contains a single-byte 2000-based year-of-manufacture code at offset 0x5D [ [http://www.jedec.org/download/search/4_01_02_04R13.PDF] ] [ [http://www.jedec.org/download/search/4_01_02_10R14.pdf] ] , which, depending on signed/unsigned interpretation, will wraparound on Dec 31 2127 or Dec 31 2255. Due to the 18-24 month generational cycle in computer technology this should not be a problem.

Year 10,000

The year 10,000 will be the first Gregorian year with five digits. Although many people at first consider this year to be so far distant that a problem of this type will never actually occur, certain classes of calculations in disciplines such as astronomy and physics already need to work with years of this magnitude and greater.

Years 32,768 and 65,536

Programs that process years as 16-bit values may encounter problems dealing with either the year 32,768 or 65,536, depending on whether the value is treated as a signed or unsigned integer.

In the case of the year 32,768 problem, years after 32,767 may be interpreted as negative numbers, beginning with -32,768. [ [http://delphi.about.com/od/humorandfun/a/funstopdelphi.htm Top 10 Fun Reasons why you Should Stop Using Delphi, now! ] ] The year 65,536 problem is more likely to manifest itself by representing the year 65,537 as the year 1. [http://libsnap.dom.edu/ClasPlus/ADDONS/Y2K.TXT]

"Problems" that aren't problems

Certain problematic years occur well past the predicted heat death of the universe, or the Big freeze, or similar predicted ultimate fate of the universe, so are mainly referenced as jokes, or to indicate that a related problem truly is solved for any reasonable or unreasonable definition of "solved."

* The year 292,277,026,596 problem: this is the year that 64-bit Unix time would reset to zero. [ [http://www.deepsky.com/~merovech/2038.html Project 2038 FAQ ] ]

* The year 170,141,183,460,469,231,731,687,303,715,884,105,727 problem: this is the year that 128-bit Unix time would reset to zero. [ [http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00465.html Jan Beulich - enable maximum integer type to be 128 bits ] ]

See also

* Software bug
* Unusual software bug

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • System time — Unix date command In computer science and computer programming, system time represents a computer system s notion of the passing of time. In this sense, time also includes the passing of days on the calendar. System time is measured by a system… …   Wikipedia

  • Year 2000 problem — Y2K redirects here. For other uses, see Y2K (disambiguation). The (French) sign reads 3 January 1900 instead of 3 January 2000 The Year 2000 problem (also known as the Y2K problem, the Millennium bug, the Y2K bug, or simply Y2K) was a problem for …   Wikipedia

  • Unusual software bug — Unusual software bugs are a class of software bugs that are considered exceptionally difficult to understand and repair. There are several kinds, mostly named after scientists who discovered counterintuitive things. Contents 1 Bohrbug 2 Mandelbug …   Wikipedia

  • Year 10,000 problem — The Year 10,000 problem, or Y10K, is the class of all potential software bugs that may emerge should the need to express years with five digits arise. The problem can have discernible effects today, but is also sometimes mentioned because of its… …   Wikipedia

  • Year 2038 problem — The year 2038 problem (also known as Unix Millennium bug , or Y2K38 by analogy to the Y2K problem) may cause some computer software to fail before or in the year 2038. The problem affects all software and systems that store system time as a… …   Wikipedia

  • Year 2070 problem — The Year 2070 problem, or Y2.07K problem [ [http://mail.python.org/pipermail/python list/2002 November/170513.html Date/Time Conversion] , a posting to the Python mailing list by Mike Brown, 8 November 2002.] , is a jargon name given to a… …   Wikipedia

  • Year 1900 problem — The year 1900 problem is a problem understanding which century before or after year 1900 an event occurred. Unlike the year 2000 problem, it is not a problem tied to computer software alone, since the problem existed before electronic computers… …   Wikipedia

  • Y1C Problem — The Y1C Problem may soon be faced by many computers and computer systems in Taiwan, officially known as the Republic of China. [ [http://pinyin.info/news/2006/taiwans y1c problem/ Pinyin news » Taiwan’s Y1C problem ] ] Similar to the Y2K problem… …   Wikipedia

  • File system — For library and office filing systems, see Library classification. Further information: Filing cabinet A file system (or filesystem) is a means to organize data expected to be retained after a program terminates by providing procedures to store,… …   Wikipedia

  • Unix — (officially trademarked as UNIX, sometimes also written as Unix with small caps) is a computer operating system originally developed in 1969 by a group of AT T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Douglas McIlroy, and… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”