Whats the "date bug"?

Reply to this note

Please Login to reply.

Discussion

If I recall correctly, it's actually referring to the UNIX date problem, which is a well acknowledged problem in UNIX formatted time which most computers use it will occur in the year 2038. I don't know what the fix is for this, maybe there's a simple solution, but because the issue is still a handful of years away no one's bothered to fix the problem.

Or maybe it's already been fixed. Either way it will cause a problem with timekeeping for computers.

Here is a wiki about it. https://en.m.wikipedia.org/wiki/Year_2038_problem

TLDR, it's not a Bitcoin-specific problem. It's a problem with computers in general and how we represent time on computers.

I thought the Unix time thing was 2106 in the case of bitcoin due to an extra bit being used?

Yes. The timestamp is unsigned 32 bit. So we get ~4.3 billion seconds since Jan 1970 unix time epoch. This lands us in 2106 (2106-02-07 06:28:15). At which time the value can overflow, which would cause mined blocks to be invalid as they'd be reporting a timestamp not allowed per median of recent blocks being well in the future.

Othet systems globally also need updates.

Presumably we'd fork to using a 64 bit time in the block.

most timestamps i know of use signed integers so they are half the distance between that date and midnight january 1 1970

sometime about 2038

yes i think that bitcoin uses unsigned unix timestamps, that is what is in my memory too, i recall reading code that has extra handling for it