The unix time is represented as a two’s complemented integer in some places. Y2K38 is actually the moment when the most significant bit becomes set, not when it rolls over to zero. That would occur in 2106. In two’s complement, the number with the most significant bit set and the rest zeros is the most negative representable number: -2,147,483,648. As a number of seconds relative to the unix epoch, that takes you back to 1901.
It’s kind of interesting it rolls over to a time close to what Y2k would have.
‘…(potentially setting time back to 1900)…’
From my understanding, unless I’m mistaken, wouldn’t the 32 bit time reset back to 1970 after the overflow/rollover?
The unix time is represented as a two’s complemented integer in some places. Y2K38 is actually the moment when the most significant bit becomes set, not when it rolls over to zero. That would occur in 2106. In two’s complement, the number with the most significant bit set and the rest zeros is the most negative representable number: -2,147,483,648. As a number of seconds relative to the unix epoch, that takes you back to 1901.
It’s kind of interesting it rolls over to a time close to what Y2k would have.
you’re wrong, but so was the article, so I guess that cancels out :D it’s late 1901
There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors.
That’s just a really solid joke.
https://en.wikipedia.org/wiki/Year_2038_problem
Timestamps that use signed int will go back to 1901 (-2,147,483,647)
Oh shit, I missed that part, I always thought it was an unsigned int… 🤦♂️
Well today I learned 👍