News for hackers. Stuff that matters.
Re:Epochalypse by chungy on Friday January 06, 2023 @11:43PM (#34285286)
Early versions of Unix moved the epoch quite frequently between various dates in the 1960s and 1970s. Version 6 finally "settled" it on 1970 and everyone has just gone with that ever since.

It's somewhat arbitrary, but by making it a signed integer, Dennis Ritchie figured it was good enough to represent dates spanning his entire life time. He probably thought Unix's life time would be significantly shorter rather than outliving him.

Re:Epochalypse by marvy on Saturday January 07, 2023 @03:19PM (#34292267)
I thought it was settled in Version 4. Compare:

https://www.tuhs.org/cgi-bin/utree.pl?file=V3/man/man2/time....

vs

https://www.tuhs.org/cgi-bin/utree.pl?file=V4/man/man2/time....

EDIT: note that back then, it was a signed integer. Turns out that people wanted to be able to represent dates from before 1970 so we lost one bit.

Re:Epochalypse by chungy on Sunday January 08, 2023 @01:00PM (#34301363)
My fuzzy memory had me thinking it was version 6, thanks for the correction!

> note that back then, it was a signed integer.

Still and always is. We'd be having a 2106 problem instead of 2038 if it was unsigned 32-bit.

Re:Epochalypse by marvy on Wednesday January 11, 2023 @09:20PM (#34348305)
sorry I meant it was an UNSIGNED integer back then