Wednesday, January 05, 2005

The Friday 13th Bug of 2038

"The year-2038 bug is similar to the Y2K bug in that it involves a time wrap not coped for by programmers."

"Most programs use Coordinated Universal Time (UTC) to work out their dates. Simply, UTC is the number of seconds elapsed since Jan 1 1970. A recent milestone was Sep 9 2001, where this value wrapped from 999'999'999 seconds to 1'000'000'000 seconds."

"Modern computers use a standard 4 byte integer for this second count. This is 31 bits, storing a value of 231. The remaining bit is the sign. This means that when the second count reaches 2147483647, it will wrap to -2147483648."

No comments: