Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Year 2038 problem
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Cause == Many computer systems measure time and date using [[Unix time]], an international standard for digital timekeeping. Unix time is defined as the number of seconds elapsed since 00:00:00 [[Coordinated Universal Time|UTC]] on 1 January 1970 (an arbitrarily chosen time based on the creation of the first [[Unix|Unix system]]), which has been dubbed the ''Unix epoch''.<ref>{{cite web|title=Epoch Time|url=https://www.unixtutorial.org/epoch-time/|access-date=13 April 2023|work=unixtutoria|date=15 March 2019|language=en|archive-date=13 April 2023|archive-url=https://web.archive.org/web/20230413221727/https://www.unixtutorial.org/epoch-time/|url-status=live}}</ref> Unix time has historically been encoded as a [[integer (computer science)|signed 32-bit integer]], a data type composed of 32 [[Bit|binary digits]] (bits) which represent an integer value, with 'signed' meaning that the number can represent both positive and negative numbers, as well as zero; and is usually stored in [[two's complement]] format.{{efn|Unless otherwise specified, all the numbers provided in this article have been derived using two's complement for signed integer arithmetic.}} Thus, a signed 32-bit integer can only represent integer values from −(2{{sup|31}}) to [[2,147,483,647|2<sup>31</sup> − 1]] inclusive. Consequently, if a signed 32-bit integer is used to store Unix time, the latest time that can be stored is 2<sup>31</sup> − 1 (2,147,483,647) seconds after epoch, which is {{#time:H:i:s "on" l, j F Y|@{{#expr:2^31 -1}}}}.<ref name="spinellis">{{cite book|author=Diomidis Spinellis|url=https://books.google.com/books?id=vEN-ckcdtCwC&q=292%2C277%2C026%2C596&pg=PA49|title=Code quality: the open source perspective|publisher=[[Adobe Press]]|year=2006|isbn=978-0-321-16607-4|edition=illustrated|series=Effective software development series in [[Safari Books Online]]|page=49}}</ref> Systems that attempt to increment this value by one more second to 2{{sup|31}} seconds after epoch (03:14:08) will suffer [[integer overflow]], inadvertently flipping the sign bit to indicate a negative number. This changes the integer value to −(2{{sup|31}}), or 2{{sup|31}} seconds ''before'' epoch rather than ''after'', which systems will interpret as 20:45:52 on Friday, 13 December 1901. From here, systems will continue to count up, toward zero, and then up through the positive integers again. As many computer systems use time computations to run critical functions, the bug may introduce serious problems.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)