Live data from Hacker News

Y292B Bug

dpolakovic.space

11–16 of 16 posts

Re: Y292B Bug

#11
post #9

The 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

#12
post #7
post #5

Earlier 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.

> But I am open to any feedback.

Next time, just say it was a joke.

Re: Y292B Bug

#13
post #7

Earlier 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.

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.

Re: Y292B Bug

#14
post #9

The 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?

Re: Y292B Bug

#15

Earlier 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?

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 */
  };

Re: Y292B Bug

#16
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.
Post reply on HN