The Year 2038 problem (also called Y2038 or Y2k38 or Unix Y2K) relates to representing time in many digital systems as the number of seconds passed since 00:00:00 UTC (primary time standard by which the world regulates clocks and time) on 1 January 1970 and storing it as a signed 32-bit integer. Such implementations cannot encode times after 03:14:07 UTC on 19 January 2038. Similar to the Y2K problem, the Year 2038 problem is caused by insufficient capacity used to represent time.

Programs that attempt to increment the time beyond this date will cause the value to be stored internally as a very large negative number, which these systems will interpret as having occurred at 20:45:52 on Friday, 13 December 1901 rather than 19 January 2038. This is caused by integer overflow, during which the counter runs out of usable digit bits, and flips the sign bit instead. This reports a maximally negative number, and continues to count up, towards zero, and then up through the positive integers again. Resulting erroneous calculations on such systems are likely to cause problems for users and other reliant parties.
Programs that work with future dates will begin to run into problems sooner; for example, a program that works with dates 10 years in the future will need to be fixed no later than 19 January 2028. Embedded systems that use dates for either computation or diagnostic logging are most likely to be affected by the 2038 problem.
Many transportation systems from flight to automobiles use embedded systems extensively. In automotive systems, this may include anti-lock braking system (ABS), electronic stability control (ESC/ESP), traction control (TCS) and automatic four-wheel drive; aircraft may use inertial guidance systems and GPS receivers.
However, this does not imply that all these systems will suffer from the Y2038 problem, since many such systems do not require access to dates. For those that do, those systems which only track the difference between times/dates and not absolute times/dates will, by the nature of the calculation, not experience a major problem. This is the case for automotive diagnostics based on legislative standards such as CARB (California Air Resources Board).
Another major use of embedded systems is in communications devices, including cell phones and Internet appliances (routers, wireless access points, etc.) which rely on storing an accurate time and date and are increasingly based on UNIX-like operating systems. For example, the Y2038 problem makes some devices running 32-bit Android crash and not restart when the time is changed to that date.
There is no universal solution for the Year 2038 problem. However, most operating systems designed to run on 64-bit hardware already use signed 64-bit integers that will not be impacted.
Read the complete article: wikipedia.com

No comments:
Post a Comment