Raise a Glass — Time(2) Turns 40 Tonight 114
ddt writes "Raise your glasses of champagne in a toast at midnight. The time(2) system call turns 40 tonight, and is now officially 'over the hill.' It's been dutifully keeping track of time for clueful operating systems since January 1, 1970." And speaking of time, if you don't have a *nix system handy, or just want a second opinion, an anonymous reader points out this handy way to check just how far it is after local midnight in Unix time. Updated 10:03 GMT by timothy: The Unix-time-in-a-browser link has been replaced by a Rick Astley video; you have been warned.
First Post! (Score:5, Informative)
There is a rickroll in article. Beware to click!
It's not April 1 yet (Score:3, Informative)
Did you even check it?
Re:Unix epoch? (Score:1, Informative)
Only a rickroll after midnight (Score:5, Informative)
Re:Give it 28 years (Score:2, Informative)
This is not true (Score:5, Informative)
Epoch starts at January 1st, 1970, but the system call itself was not around in 1970 [wikipedia.org].
Re:That's funny,... (Score:3, Informative)
Re:Over the hill? (Score:3, Informative)
Re:Give it 28 years (Score:5, Informative)
Nope, the maximum value for 32-bit time_t is 2147483647. Increment that by 1, and the time_t value becomes -2147483648.
Although time_t is a 32-bit value, the 1st bit is the sign bit.
Jan 18 21:14:07, 2038
For 64-bit time_t it should be 9223372036854775807. But I don't believe the standard time functions can handle this value...
While it may be a perfectly valid 64-bit time_t value, if gmtime/localtime/strftime/ctime don't work with the maximum value, it's not a usable value, really
Re:Give it 28 years (Score:4, Informative)
Indeed.
Some binary blobs do require the use of a signed integer for calculating differences in time which is much of the apparent hesitancy to convert to a 32 bit unsigned integer time system. More here. [wikipedia.org]
Re:Give it 28 years (Score:1, Informative)
Although time_t is a 32-bit value, the 1st bit is the sign bit.
The 1st bit is not a sign bit! Signed integer coding uses two's complement arithmetic [wikipedia.org].