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:
> BTW. What is the _exact_ datetime when Unix's freak ?

I'm not sure about "freak", but:

#include <time.h>
#include <stdio.h>
int main() {
time_t t = (time_t) 0x7fffffff;
puts(ctime(&t));
return 0;
}

gives me Mon Jan 18 22:14:07 2038. I guess I was a little surprised
to find that negative time_t's do map to pre-epoch values. just
turning time_t unsigned would give us 2106. personally, I'd like to
see a higher-resolution time function, something like 64b of ns
since the epoch. and this time, let's make the epoch Linus's b-day ;)

regards, mark hahn.


-
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.510 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site