Misplaced Pages

Year 2038 problem: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 09:21, 13 December 2006 editNotinasnaid (talk | contribs)13,255 edits No obviously new content in external link← Previous edit Revision as of 20:15, 20 December 2006 edit undoDrano (talk | contribs)184 edits remove joke. funny, but doesn't belongNext edit →
Line 11: Line 11:
Most operating systems for ] ]s already use 64-bit integers in their <code>time_t</code>. The move to these architectures is already underway and many expect it to be complete before 2038. However, as of 2006, hundreds of millions of 32-bit systems are deployed, many in ]s, and it is far from certain they will all be replaced by 2038. Despite the modern 18- to 24-month generational update in computer systems technology, embedded computers may operate unchanged for the life of the system they control. The use of 32-bit <code>time_t</code> has also been encoded into file formats, such as the common ], which means it can live on for a long time beyond the life of the machines involved. Most operating systems for ] ]s already use 64-bit integers in their <code>time_t</code>. The move to these architectures is already underway and many expect it to be complete before 2038. However, as of 2006, hundreds of millions of 32-bit systems are deployed, many in ]s, and it is far from certain they will all be replaced by 2038. Despite the modern 18- to 24-month generational update in computer systems technology, embedded computers may operate unchanged for the life of the system they control. The use of 32-bit <code>time_t</code> has also been encoded into file formats, such as the common ], which means it can live on for a long time beyond the life of the machines involved.


Using a (signed) 64-bit value introduces a new wraparound date in about 290 billion years, on Sunday, December 4, ]. However, this problem is not widely regarded as a pressing issue. (A signed, 64-bit value is used in Microsoft's proposed replacement for time_t, dubbed __time64_t.) Using a (signed) 64-bit value introduces a new wraparound date in about 290 billion years, on Sunday, December 4, ], and as such, would suffice for all real-world use cases. (A signed, 64-bit value is used in Microsoft's proposed replacement for time_t, dubbed __time64_t.)


A proposal by the ] project is to count the number of ]s since midnight, ], ] ] in a signed 64 bit integer, which would be enough for the next 300,000 years in microsecond resolution.<ref>{{cite web | url=http://www.unununium.org/articles/uuutime | title=Unununium Time | accessdate=2006-11-19}}</ref> A proposal by the ] project is to count the number of ]s since midnight, ], ] ] in a signed 64 bit integer, which would be enough for the next 300,000 years in microsecond resolution.<ref>{{cite web | url=http://www.unununium.org/articles/uuutime | title=Unununium Time | accessdate=2006-11-19}}</ref>

Revision as of 20:15, 20 December 2006

The year 2038 problem may cause some computer software to fail before or in the year 2038. The problem affects programs that use the POSIX time representation, which represents system time as the number of seconds (ignoring leap seconds) since January 1, 1970. This representation is standard in Unix-like operating systems and also affects software written for most other operating systems because of the broad deployment of C. On most 32-bit systems, the time_t data type used to store this second count is a signed 32-bit integer. The latest time that can be represented in this format, following the POSIX standard, is 03:14:07 UTC on Tuesday, January 19, 2038. Times beyond this moment will "wrap around" and be represented internally as a negative number, and cause programs to fail, since they will see these times not as being in 2038 but rather in 1970 or 1901, depending on the implementation. Erroneous calculations and decisions may therefore result.

"Year 2038" is frequently abbreviated to "Y2038" or sometimes "Y2K38" in software professionals' jargon.

Known problems

In May 2006, reports surfaced of an early Y2038 problem in the AOLServer software. The software would specify that a database request should "never" timeout by specifying a timeout date one billion seconds in the future. One billion seconds after 21:27:28 on 12 May 2006 is beyond the 2038 cutoff date, so after this date, the timeout calculation overflowed and calculated a timeout date that was actually in the past, causing the software to crash.

Solutions

There is no easy fix for this problem for existing CPU/OS combinations. Changing the definition of time_t to use a 64-bit type would break binary compatibility for software, data storage, and generally anything dealing with the binary representation of time. Changing time_t to an unsigned 32-bit integer, effectively allowing timestamps to be accurate until the year 2106, would affect many programs that deal with time differences.

Most operating systems for 64-bit architectures already use 64-bit integers in their time_t. The move to these architectures is already underway and many expect it to be complete before 2038. However, as of 2006, hundreds of millions of 32-bit systems are deployed, many in embedded systems, and it is far from certain they will all be replaced by 2038. Despite the modern 18- to 24-month generational update in computer systems technology, embedded computers may operate unchanged for the life of the system they control. The use of 32-bit time_t has also been encoded into file formats, such as the common ZIP file format, which means it can live on for a long time beyond the life of the machines involved.

Using a (signed) 64-bit value introduces a new wraparound date in about 290 billion years, on Sunday, December 4, 292,277,026,596, and as such, would suffice for all real-world use cases. (A signed, 64-bit value is used in Microsoft's proposed replacement for time_t, dubbed __time64_t.)

A proposal by the Unununium project is to count the number of microseconds since midnight, January 1, 2000 TAI in a signed 64 bit integer, which would be enough for the next 300,000 years in microsecond resolution.

References

  1. "The Future Lies Ahead". 2006-06-28. Retrieved 2006-11-19. {{cite web}}: Check date values in: |date= (help)
  2. Shiobara, Dossy (2006-05-17). "Something wrong after 2006-05-12 21:25". Retrieved 2006-11-19. {{cite web}}: Check date values in: |date= (help)
  3. "Unununium Time". Retrieved 2006-11-19.

See also

External links

Categories: