Re: time_t size: The year 2038 bug Summary:

From: Mark Hahn (hahn@coffee.psychology.mcmaster.ca)
Date: Tue Jan 11 2000 - 20:43:38 EST


> 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/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:19 EST