Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Re: Re: 2038 bug

by halley (Prior)
on Apr 11, 2003 at 14:04 UTC ( #249890=note: print w/replies, xml ) Need Help??

in reply to Re: Re: 2038 bug
in thread 2038 bug

tachyon wrote, "What I don't really understand is why you could not make time_t an unsigned 4 byte int and thus get another 68 odd years out of it. Leaving aside the problems with C code that expects it to be signed. Why was it unsigned in the first place anyway?"

How would you denote my birthdate in 1967, if you use an unsigned forward-pointing integer measured from the epoch of 1970?

Java standardized on a 64-bit signed time in milliseconds from the same 1970 epoch, which gives them enough range to describe any moment from big bang to big whimper, remain coherent with code that thinks that 1970 was a pretty cool year, and still be a thousand times more precise than the standard unix time. I don't expect time() to follow that standard, but I do think it's safe to say, even considering the usual famous misquote, that 64 bits should be enough for anyone.

e d @ h a l l e y . c c

Replies are listed 'Best First'.
Re: 2038 bug
by Abigail-II (Bishop) on Apr 11, 2003 at 14:50 UTC
    Well, in many areas a millisecond is long. It's a nice ping time to, but I wouldn't like a millisecond main memory access time. For some physicists, even nanoseconds are not precise enough, they require pico-, femto- or even attoseconds. Unfortunally, with 64 bits and attosecond precision, you only have less than 18.5 seconds as your range.

    Of course, you could always use XS, or Inline::C and use libtai


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://249890]
[choroba]: Very nice!

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2018-02-23 14:58 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (302 votes). Check out past polls.