lkml.org 
[lkml]   [2000]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: time_t size: The year 2038 bug Summary:
[ Tuesday, January 11, 2000 ] Lauri Tischler wrote:
> BTW. What is the _exact_ datetime when Unix's freak ?

Short answer: Tue Jan 19 03:14:07 2038 (UTC/GMT)

When the signed int of 32 bits (2's complement) wraps from INT_MAX to
INT_MIN by incrementing

jmm@jmm:/home/jmm> export TZ=UTC
jmm@jmm:/home/jmm> perl -le 'print scalar localtime 2**31-1'
Tue Jan 19 03:14:07 2038
jmm@jmm:/home/jmm> perl -le 'print scalar localtime 2**31'
Fri Dec 13 20:45:52 1901

And just for trivia:

jmm@jmm:/home/jmm> perl -le 'print scalar localtime 0'
Thu Jan 1 00:00:00 1970

James
--
Miscellaneous Engineer --- IBM Netfinity Performance Development

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.078 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site