Saturday, September 1

Year 2038 Bug



Year 2038 Bug


Computer programs, softwares and systems that uses 32 bit integer to represent UNIX Time will fail after 19th, Jan, 2038 at 3:14:07.

What ?

Unix Time is another way of telling time, mostly for computer’s understanding. Each instances are defined as number of seconds elapsed after 1970-01-01 00:00:00.

Eg: UNIX Time for 31st Aug 2012 18:59:09 = 1346439549


On 19th, Jan, 2038 at 3:14:07, the 32 bit signed integer will reach its limit. After that, bit will overflow the 32-bit counter and reset the time to 1st Jan, 1901.

2038 bug


Attention to Mysql Users


Mysql 5 is a 32 bit database, it has a function UNIX_TIMESTAMP() which returns seconds since 1970-01-01 00:00:00. This function will return only 0 after 19th Jan, 2038 03:14:07 GMT.


The end time would be different for each region based on their time zone.

Auckland +12:00 19-01-2038 15:14:07
Sydney +10:00 19-01-2038 13:14:07
Tokyo +9:00 19-01-2038 12:14:07
Beijing +8:00 19-01-2038 11:14:07
Mumbai +5:30 19-01-2038 08:44:07
Dubai +4:00 19-01-2038 07:14:07
Nairobi +3:00 19-01-2038 06:14:07
Cairo +2:00 19-01-2038 05:14:07
Paris +1:00 19-01-2038 04:14:07
London UTC 19-01-2038 03:14:07
Brasilia -3:00 19-01-2038 00:14:07
Atlantic Time -4:00 18-01-2038 23:14:07
Eastern Time -5:00 18-01-2038 22:14:07
Central Time -6:00 18-01-2038 21:14:07
Mountain Time -7:00 18-01-2038 20:14:07
Pacific Time -8:00 18-01-2038 19:14:07
Hawai -10:00 18-01-2038 17:14:07

References:

1. http://en.wikipedia.org/wiki/Year_2038_problem
2. http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html#function_unix-timestamp

No comments:

Post a comment