The Linux kernel keeps time as a 64-bit integer, but it's in nanoseconds, not seconds. It's a Y2262 problem.
Y292B Bug
11–16 of 16 posts
Re: Y292B Bug
#12Earlier quoted context omitted.
> 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.
Next time, just say it was a joke.
Re: Y292B Bug
#13Earlier quoted context omitted.
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.
Re: Y292B Bug
#14The 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.
Re: Y292B Bug
#15Earlier quoted context omitted.
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?
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
};