Katana VentraIP

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 most well-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[edit]

On 4 January 1975, the 12-bit field that had been used for dates in the DECsystem-10 operating systems overflowed. There were numerous problems and crashes related to this bug while an alternative format was developed.[1]

Year 1978[edit]

The Digital Equipment Corporation OS/8 operating system for the PDP-8 computer used only three bits for the year, representing the years 1970 to 1977.[2]


This was recognized when the COS-310 operating system was developed, and dates were recorded differently.[3]

Year 1993[edit]

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 (Mac SCI) 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 for 18 hours and so on. Sierra released a patch called MCDATE that resolved the problem for almost 14 years.[4][5]

Year 1997[edit]

The Domain/OS clock, which is based on the number of 4-microsecond units that has occurred since 1 January 1980, rolled past 47 bits on 2 November 1997, rendering unpatched systems unusable.[6]

Year 2001[edit]

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 (the "billenium"). Problems were not widespread.[12]

Year 2007[edit]

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.[4]

Year 2010[edit]

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.[13]


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 0016 through 0916. But the decimal number 10 is encoded in hexadecimal as 0A16 and in BCD as 1016. Thus a BCD 1016 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.[14][15]


Other systems affected include EFTPOS terminals,[16] and the PlayStation 3 (except the Slim model).[17]


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.[18]


The most important such glitch occurred in Germany, where upwards of 20 million bank cards became unusable, and with Citibank Belgium, whose digipass customer identification chips stopped working.[19]

Year 2013[edit]

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 tenth-seconds since 1 January 2000.[21]

Year 2019[edit]

Second GPS rollover[edit]

In 2019, the second GPS week number rollover occurred.

Year 2021[edit]

Samsung users reported that phones running on the latest One UI 3.0 update or Android 11 lost access to the battery and charging statistics starting in 2021. Affected devices would not report usage statistics, thus leaving those sections blank.[32][33]

Year 2022[edit]

Dates that are stored in the format yymmddHHMM converted to a signed 32-bit integer overflowed on 1 January 2022, as 231=2147483648. Notably affected was the malware-scanning component update numbers of Microsoft Exchange, which appear to be used for a mathematical check to determine the latest update.[34][35]


Honda and Acura cars manufactured between 2004 and 2012 containing GPS navigation systems incorrectly displayed the year as 2002. This problem was due to an overflow on the GPS epoch.[36][37] The issue was resolved on August 17, 2022.[38]

Year 2024[edit]

Payment card readers at petrol pumps in New Zealand were unable to handle the leap year and were unable to properly dispense gasoline.[39]


Video games EA Sports WRC and Theatrhythm Final Bar Line also suffered issues related to the leap year, with the former crashing when trying to load the game and the latter claiming that the save data was corrupted. Both games had to be set to the following day of March 1, 2024 to properly work.[40][41][42]

Year 2025[edit]

In Japan, some older computer systems using the Japanese calendar that have not been updated still count years according to the Shōwa era. The year 2025 corresponds in those systems to Shōwa 100, which can cause problems if the software assumes two digits for the year.[43]

Year 2028[edit]

Some systems store their year as a single-byte offset from 1900, which gives a range of 255 (8 bits) and allows dates up to 2155 to be safely represented. However, not all systems use an unsigned byte: some have been mistakenly coded with a signed byte which only allows a range of 127 years, meaning that the date field in the software will be incorrect after 2027 and can cause unpredictable behaviour. Several pieces of optical-disc software that operate using the ISO 9660 format are affected by this.[44]


During the late 1970s, on Data General Nova and Eclipse systems, the World Computer Corporation (doing credit union applications) created a date format with a 16-bit date field for 128 years (7 bits – note 1900+128=2028), 12 months (4 bits) and 31 days (5 bits). This allowed dates to be directly comparable using unsigned functions. Some systems, including HP 3000, still use this format, although a patch has been developed by outside consultants.[45]

Year 2032[edit]

Palm OS uses both signed integers with the 1970 epoch, as well as unsigned integers with the 1904 epoch, for different system functions,[46] such as for system clock, and file dates (see PDB format). While this should result in Palm OS being susceptible to the 2038 problem, Palm OS also uses a 7-bit field for storing the year value, with a different epoch counting from 1904, resulting in a maximum year of 2031 (1904+127).[47]

Year 2040[edit]

Early Apple Macintosh computers store time in their real-time clocks (RTCs) and HFS filesystems as an unsigned 32-bit number of seconds since 00:00:00 on 1 January 1904. After 06:28:15 on 6 February 2040, (i.e. 232−1 seconds from the epoch), this will wrap around to 1904:[52] further to this, HFS+, the default format for all of Apple's recent Macintosh computers, is also affected. The replacement Apple File System resolves this issue.


ProDOS for the Apple II computers only supports two-digit year numbers. To avoid Y2K issues, Apple issued a technical note stating that the year number was to represent 1940–2039.[53] Software for the platform may incorrectly display dates beginning in 2040, though a third-party effort is underway to update ProDOS and application software to support years up to 4095.[54]

Year 2042[edit]

On 18 September 2042, the Time of Day Clock (TODC) on the S/370 IBM mainframe and its successors, including the current zSeries, will roll over.[55]


Older TODCs were implemented as a 64-bit count of 2−12 microsecond (0.244 ns) units, and the standard base was 1 January 1900, UT. In July 1999 the extended TODC clock was announced, which extended the clock to the right (that is, the extended bits are less significant than the original bits). The actual resolution depends on the model, but the format is consistent, and will, therefore, roll over after 252 microseconds.[55]


The TODC value is accessible to user mode programs and is often used for timing and for generating unique IDs for events.


While IBM has defined and implemented a longer (128-bit) hardware format on recent machines, which extends the timer on both ends by at least 8 additional bits, many programs continue to rely on the 64-bit format which remains as an accessible subset of the longer timer.

Year 2048[edit]

The capacity planning logic in the ERP system SAP S/4HANA supports only finish dates up to 19 January 2048, (24,855 days from 1 January 1980). This concerns e.g. the production, maintenance and inspection planning.[56]

Year 2069[edit]

According to the Single UNIX Specification for parsing two-digit years using strptime(), "values in the range [69,99] shall refer to years 1969 to 1999 inclusive and values in the range [00,68] shall refer to years 2000 to 2068 inclusive",[57] meaning that, when parsed by strptime(), the two-digit year "69" would be interpreted as 1969 rather than 2069.

Year 2079[edit]

Days 32,768 and 65,536[edit]

Programs that store dates as the number of days since an arbitrary date (or epoch) are vulnerable to roll-over or wrap-around effects if the values are not wide enough to allow the date values to span a large enough time range expected for the application. Signed 16-bit binary values roll over after 32,768 (215) days from the epoch date, producing negative values. Some mainframe systems experienced software failures because they had encoded dates as the number of days since 1 January 1900, which produced unexpected negative day numbers on the roll-over date of 18 September 1989. Similarly, unsigned 16-bit binary days counts overflow after 65,536 (216) days, which are truncated to zero values. For software using an epoch of 1 January 1900, this will occur on 6 June 2079.[58]

Year 2080[edit]

Some (if not all) Nokia phones that run Series 40 (such as the Nokia X2-00) only support dates up to 31 December 2079, and thus will be unable to display dates after this. One workaround is to use the year 1996, 2024 or 2052 in lieu of 2080 (as compatible leap years) to display the correct day of the week, date and month on the main screen.


Systems storing the year as a two-digit value 00..99 internally only, like many RTCs, may roll over from 31 December 2079, to the IBM PC and DOS epoch of 1980-01-01.

Year 2106[edit]

Many existing file formats, communications protocols, and application interfaces employ a variant of the Unix time_t date format, storing the number of seconds since the Unix Epoch (midnight UTC, 1 January 1970) as an unsigned 32-bit binary integer. This value will roll over on 7 February 2106 at 06:28:15. That is, at this time the number of seconds since 1 January 1970 is FFFF FFFF in hex.


This storage representation problem is independent of programs that internally store and operate on system times as 64-bit signed integer values.

Year 2108[edit]

The date timestamps stored in FAT filesystems, originally introduced with 86-DOS 0.42 in 25 February 1981 and carried over into MS-DOS, PC DOS, DR-DOS etc., will overflow at the end of 31 December 2107. The last modification date stamp (and with DELWATCH 2.0+ also the file deletion date stamp, and since DOS 7.0+ optionally also the last access date stamp and creation date stamp), are stored in the directory entry with the year represented as an unsigned seven bit number (0–127), relative to 1980, and thereby unable to indicate any dates in the year 2108 and beyond. The API functions defined to retrieve these dates officially only support dates up to 31 December 2099.


This will also affect the ZIP archive file format, as it uses FAT file modification timestamps internally.

Year 2248[edit]

RISC OS stores dates as centiseconds since the start of Monday 1st January 1900 in five bytes – 40 bits. These timestamps are used internally and exposed in file metadata (load and exec addresses). This epoch ends on 3rd June 2248 at 06:57:57.75 UTC. [59]

Year 2262[edit]

Some timekeeping systems count nanoseconds since 1970 using a 64-bit signed integer, which will overflow at 11 April 2262, 23:47:16. The Go programming language's UnixNano API is one example.[60] Other examples include the Timestamp object in Python pandas,[61] C++ chrono::nanoseconds,[62] and the QEMU timers.[63]

Year 2286[edit]

Systems that use a string of length 10 characters to record the Unix time may have problems reporting times beyond the ten-billionth second after 20 November 2286, at 17:46:40.

Year 2446[edit]

In ext4, the default file system for many Linux distributions, the bottom two bits of {a,c,m}time_extra are used to extend the {a,c,m}time fields, deferring the year 2038 problem to the year 2446.[64] Within this "extra" 32-bit field, the lower two bits are used to extend the 32-bit seconds field to be 34 bit wide; the upper 30 bits are used to provide nanosecond timestamp accuracy. Therefore, timestamps should not overflow until May 2446.[65]

Years 4000, 8000, etc.[edit]

On time scales of thousands of years, the Gregorian calendar falls behind the astronomical seasons. This is because the Earth's speed of rotation is gradually slowing down, which makes each day slightly longer over time (see tidal acceleration and leap second) while the year maintains a more uniform duration.


In the 19th century, Sir John Herschel proposed a modification to the Gregorian calendar with 969 leap days every 4000 years, instead of 970 leap days that the Gregorian calendar would insert over the same period.[66] This would reduce the average year to 365.24225 days. Herschel's proposal would make the year 4000, and multiples thereof, common instead of leap. While this modification has often been proposed since, it has never been officially adopted.[67]


While most software (including Excel, JavaScript and R) currently recognizes 4000 and 8000 as leap years (as they are divisible by 400), SAS has adopted the "4000 year rule". Thus, with the current software, date conversions between SAS and other software will go out of sync after 28 February 4000.[68][69]

Year 4501[edit]

Microsoft Outlook uses the date 1 January 4501 as a placeholder for "none" or "empty".[70][71]

Year 30,828[edit]

Beginning 14 September 30,828, Windows will not accept dates beyond this day and on startup, it will display an error regarding "invalid system time" in NTFS. This is because the FILETIME value in Windows, which is a 64-bit value corresponding to the number of 100-nanosecond intervals since 1 January 1601, 00:00:00.0000000 UTC, will overflow its maximum possible value on that day at 02:48:05.4775808 UTC.[74]

Years 32,768 and 65,536[edit]

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.


For the year 32,768 problem, years after 32,767 may be interpreted as negative numbers, beginning with −32,768.[75] The year 65,536 problem is more likely to manifest itself by representing the year 65,536 as the year 0.[76]

Year 100,000[edit]

The year 100,000 will be the first Gregorian year with six digits.

Year 275,760[edit]

JavaScript's Date API stores dates as the number of milliseconds since 1 January 1970. Dates have a range of ±100,000,000 days from the epoch, meaning that programs written in JavaScript using the Date API cannot store dates past 13 September, AD 275,760.[77]

Year 292,277,026,596[edit]

Certain problematic years occur so far in the future (well beyond the likely lifespan of the Earth, the Sun, humanity, and even past some predictions of the lifetime of the universe) that they are mainly referenced as matters of theoretical interest, jokes, or indications that a related problem is not truly solved for any reasonable definition of "solved".


The year 292,277,026,596 problem (about 2.9×1011 years in the future) will occur when the 64-bit Unix time overflows after 15:30:08 UTC on Sunday, 4 December, AD 292,277,026,596.[78][79]

Relative time overflow[edit]

Microsoft[edit]

In Microsoft Windows 7, Windows Server 2003, Windows Server 2008 and Windows Vista, TCP connection start information was stored in hundredths of a second, using a 32-bit unsigned integer, causing an overflow and TCP connections to fail after 497 days.[80]


Microsoft Windows 95 and Windows 98 had a problem with 2^32 millisecond rollover in a virtual device driver (VTDAPI.VXD), which caused systems to hang after 49.7 days.[81]


.NET up to version 6.0 had a bug that caused threadpool hill-climbing to fail periodically after 49.7 days due to an overflow while handling the milliseconds since startup.[82]

Boeing[edit]

The Boeing 787 aircraft has had at least two software issues related to time storage. In 2015, an error was reported where time was stored in hundredths of a second, using a signed 32-bit integer, and the systems would crash after 248 days.[83]


In 2020, the FAA issued an airworthiness directive for a problem where, if the aircraft is not powered down completely before reaching 51 days of uptime, systems will begin to display misleading data.[84]

Arduino[edit]

The Arduino platform provides a relative time via the millis() function. This function returns an unsigned 32 bit value for "milliseconds since startup", which is designed to roll over every 49.71 days. By default, this is the only timing source available in the platform and programs need to take special care to handle rollovers.[85] Internally, millis() is based on counting timer interrupts. Certain powersave modes disable interrupts and therefore stop the counter from advancing during sleep.[86]

Year zero problem

Year 1000 problem

Year 1582 problem

Year 1900 problem

Also for historic years there might be problems when handling historic events, for example:

Software bug

Heisenbug

Long Now Foundation