Time formatting and storage bugs


In computer science, data type limitations and software bugs can cause errors in time and date calculation or display. These are most commonly manifestations of arithmetic overflow, but can also be the result of other issues. The best-known consequence 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.

Year 1975

On 5 January 1975, the 12-bit field that had been used for dates in the TOPS-10 operating system for DEC PDP-10 computers overflowed, in a bug known as "DATE75". The field value was calculated by taking the number of years since 1 January 1964, multiplying by 12, adding the number of months since January, multiplying by 31, and adding the number of days since the start of the month. The maximum value representable using an unsigned 12-bit integer is, and the value of 4095 represents 4 January 1975:
Therefore 4 January 1975 is the latest encodable date. The "DATE-75" patch pushed the last encodable date to 1 February 2052, making the overflow date 2 February 2052, by using 3 spare bits from other fields in the file system's metadata, but this sometimes caused problems with software that used those bits for its own purposes. Some software may have supported using one additional bit for the date but had issues with additional bits, which could have resulted in some bugs on 9 January 1986.

Year 1978

Digital Equipment Corporation's OS/8 operating system for the PDP-8 computer used a signed four-bit nibble to store the number of years since 1970, and this could only represent the years 1970 to 1977.
This was recognized when the COS-310 operating system was developed, and dates were recorded differently.

[|Year 1993]

Multiple Sierra Entertainment games released for the Classic Mac OS started to freeze when running on 18 September 1993. An issue in the Mac version of Sierra's Creative Interpreter would cause the game to "lock up" when attempting to handle a delay due to a problem involving an overflow. Mac SCI would attempt to use the date to determine how long a delay should last by getting the current time in seconds since 1 January 1904, the [|Macintosh epoch], and dividing by 12 hours. The division was processed by the Motorola 68000 and would not occur if an overflow was detected because of the division, but the Mac SCI would continue on regardless as if the division had occurred, eventually resulting in a delay of one second being treated as a delay of 18 hours and so on. Sierra released a patch called MCDATE that resolved the problem for almost 14 years.

Year 1997

In Apollo Computer's Domain/OS operating system, absolute time was stored as a signed 48-bit integer representing the number of 4-microsecond units since 1 January 1980. This value overflowed on 2 November 1997, rendering unpatched systems unusable.

Year 1999

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.

First GPS rollover

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 after Sunday 6 January 1980,, the date resets again to that date; this happened for the first time at 23:59:47 on 21 August 1999, the second time at 23:59:42 UTC on 6 April 2019, and will happen again on 20 November 2038. To address this concern, modernised GPS navigation messages use a 13-bit field, which only repeats every 8,192 weeks, and will not return to zero until the year 2137.

9/9/99

Many legacy programs or data sets used "9/9/99" as a rogue value to indicate either an unresolved date or as a terminator to indicate no further data was in the set. This caused many systems to crash upon the arrival of the actual date this represents: 9 September 1999.

Year 2000

Two-digit year representations

The term year 2000 problem, or simply Y2K, refers to potential computer errors related to the formatting and storage of calendar data for dates in and after the year 2000. Many programs represented four-digit years with only the final two digits, making the year 2000 indistinguishable from 1900. Computer systems' inability to distinguish dates correctly had the potential to bring down worldwide infrastructures for computer reliant industries.
For applications required to calculate the birth 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 2001

Systems that used a string of nine digits to record the time as seconds since the Unix epoch had issues reporting times beyond the one-billionth second after the epoch on 9 September 2001 at 01:46:40. Problems were not widespread.

Year 2007

Sierra Entertainment games for the Classic Mac OS that were patched with the MCDATE program or released afterwards with the patch built in would begin to freeze on 28 May 2007. As with the Year 1993 problem, this was due to an issue in the Mac SCI when attempting to use the date to determine how long a delay should last. Programs with the MCDATE patch freeze because the Mac SCI takes the current number of seconds since the Macintosh epoch of 1 January 1904, subtracts 432,000,000 seconds from that, and then divides by 12 hours through the Motorola 68000, to then determine how long delays should last. On 28 May 2007, the Motorola 68000 again does not divide due to overflow protection, which the Mac SCI ignores.

Year 2010

Some systems had problems once the year rolled over to 2010. This was dubbed by some in the media as the "Y2K+10" or "Y2.01k" problem.
The main source of problems was confusion between hexadecimal number encoding and BCD encodings of numbers. The numbers 0 through 9 are encoded in both hexadecimal and BCD as 00 through 09. But the decimal number 10 is encoded in hexadecimal as 0A and in BCD as 10. Thus a BCD 10 interpreted as a hexadecimal encoding erroneously represents the decimal number 16.
For example, the SMS protocol uses BCD encoding for dates, so some mobile phone software incorrectly reported dates of messages as 2016 instead of 2010. Windows Mobile was the first software reported to have been affected by this glitch; in some cases WM6 changed the date of any incoming SMS message sent after 1 January 2010, from the year 2010 to 2016.
The most notable glitch occurred in Germany, where upwards of 20 million bank cards became unusable, and with Citibank Belgium, whose customer identification chips stopped working.
Other systems affected include EFTPOS terminals, and the PlayStation 3.
Sony's PlayStation 3 incorrectly treated 2010 as a leap year, so the non-existent 29 February 2010, was shown on 1 March 2010, causing a program error.

Year 2011

officially uses the Minguo calendar, which considers the Gregorian year 1912 to be its year 1. Thus, the Gregorian year 2011 is the ROC year 100, its first 3-digit year. This causes the year to appear to be 1911 if 2-digit representations are used.

Year 2013

The Deep Impact space probe lost communication with Earth on 11 August 2013, because of a time-tagging problem; the date was stored as an unsigned 32-bit integer counting the number of tenths of a second since 1 January 2000.

Year 2019

Second GPS rollover

In 2019, the second GPS week number rollover occurred. Meade computerized telescopes with GPS like the LX200GPS could no longer find their location and thus could not align themselves or locate stellar objects. Meade released firmware version 4.2k with a fix but which also introduced many new bugs; version 4.2l was then released to fix that, but had more inexplicable changes. A third party, StarPatch, released a hacked version of firmware version 4.2g at no cost to fix these issues.

Japanese calendar transition

On 30 April 2019, Emperor Akihito of Japan abdicated in favor of his son Naruhito. As years in Japan are traditionally referred to by era names that correspond to the reign of each emperor, this resulted in a new era name, Reiwa, following Naruhito's accession to the throne the following day. Because the previous emperor, Hirohito, died 7 January 1989, and Akihito's reign mostly corresponded with the rise in the use of computers, most software had not been tested to ensure correct behavior on an era change, while testing was further complicated by the fact that the new era name was not revealed until 1 April 2019. Therefore, errors were expected from software that did not anticipate a new era.

Year 2020

The video games WWE 2K20 and Star Wars Jedi: Fallen Order both crashed on 1 January 2020, when the year rolled over. The glitches could only be circumvented by resetting the year back to 2019 until a patch was released. Additionally, Crystal Reports 8.5 would fail to generate specific reports starting in 2020.
Parkeon parking meters in New York City and other locations were unable to accept credit cards as a form of payment starting in 2020. A workaround was implemented, but required each meter to be individually updated. In New York, the meters were not expected to be fixed until 9 January.
In Poland, 5,000 cash registers stopped properly printing dates.
Suunto sport smart watches displayed an error in computing weekdays, displaying days that were two days ahead of their actual dates. For Suunto Spartan model watches, the bug was fixed with firmware release 2.8.32.

Classic Mac OS

The control panel in Classic Mac OS versions 6, 7, and 8 only allows the date to be set as high as 31 December 2019, although the system is able to continue to advance time beyond that date.

Microsoft Schedule+

Microsoft Schedule+ version 1.0 refuses to work with years greater than 2020 or beyond because the program was designed to operate within a 100-year time window ranging from 1920 to 2019. As a result, the date can only be set as high as 31 December 2019. Microsoft has stated that this was by design.