It’s not the overflow that’s the issue, but a calculation failure that causes the date value to be “0” and thus list the date as January 1, 1970. It’s happened to me several times with Pokemon GO.
Comment on Epoch fail!!!
ChaoticNeutralCzech@feddit.org 3 months ago
Inaccurate. Signed 32-bit integer epoch overflows from January 2038 to December 1901.
Zoomboingding@lemmy.world 3 months ago
jaybone@lemmy.world 3 months ago
Fuck the specs. If Pokemon GO says it, that’s good enough for me.
ChaoticNeutralCzech@feddit.org 3 months ago
In this case, it’s the overflow as
01111111…11111111+1
in binary becomes10000000…00000000
.But yes, some programs erroneously fall back to
0
in case of anull
value, which corresponds to 1970-01-01. That’s why so many geotags exist for Null Island.Matty_r@programming.dev 3 months ago
For those wanting to know why, its called Two’s complement
observantTrapezium@lemmy.ca 3 months ago
Haha, that’s right. Immediate noticed that.
saigot@lemmy.ca 3 months ago
If the calendar was written in C++ or many of it’s derivatives then signed integer overflow is undefined behaviour and it could technically choose to do anything it damn well wants (unsigned integers actually do have defined overflow behaviour). Something tells me the runtime of a paper calendar is anything but standard :D