Y292B Bug
dpolakovic.spaceThe Linux kernel keeps time as a 64-bit integer, but it's in nanoseconds, not seconds. It's a Y2262 problem.
That's way easier to fix, though. You just need to fix the kernel's internal structures to keep track of time using two numbers. Y2K was a problem because everyone had to fix their code, not just OSs.
It'll still be a problem for code that relies on time being 64-bit int of nanoseconds. How do you change the internal representation here without also breaking the API contract for application code?
The kernel does not have an API that exposes that representation to user code; system calls operate on timespec structs
struct timespec { time_t tv_sec; /* seconds */ long tv_nsec; /* nanoseconds */ };
You will have worse problems in 292B years.
In 4.5 billion years we would live in the result of the Milky way galaxy merging with Andromeda, which will increase our chances of encountering either alien life, or alien artificial entities.
And after 200+ billion years, the sun, after having been a red giant and evaporated all oceans on Earth, will become a white dwarf.
> And after 200+ billion years, the sun, after having been a red giant
Technically speaking, that would be the end of our problems unless
> the Milky way galaxy merging with Andromeda
won't finish us first or... some stray asteroid of sufficiently lethal size and speed bumps into our green/blue golf ball
Maybe the universe is 64bit? It just starts all over again... and again... and again...
I love the thought that we have a new Year 0, and I was alive for it (just). I can see a point where we forget why the year numbers start at 1,970 instead of 0, or consider it a historical oddity.
I can't really tell if this is a sort of satire or joke?
It seems to implement BigInts as BCD where each decimal digit gets it's own int32, implements division, then suggests kernel upstreaming. All as a solution for arbitrary spans of time.
> The number overflows and the date will jump back 278 billion years before the Big Bang? Needles to say, this needs to be fixed. Luckily, we have 33 life times of our Sun to solve this problem but we could propose some solutions even today.
Based on this, it has to be a joke, or at least a tongue-in-cheek exercise that is "solving" an imaginary problem.
hello, truly, the code can use an optimization, that's why I presented it as an proposition or rather idea. E.g. the digits could be byte. However, the idea is no joke at all. Point was to offer complete software solution, dependable only on hardware. But I am open to any feedback.
>the idea is no joke
It's not? But it's predicated on the idea that human life hundreds of billions of years from now will be more or less the same as it is now, to the extent that they'll even still be using the same APIs and OSs. It's difficult to believe someone would posit that as anything other than a joke.
I hear your point. We truly don't know what will future bring, even less the future of year 292 billion. But again, I am proposing the software complete solution - even without current use case.
> But I am open to any feedback.
Next time, just say it was a joke.