DEV Community

Discussion on: Y2K22 - The Mistake That Embarrasses Us

Collapse
 
raddevus profile image
raddevus • Edited

I didn't know about this format and this problem.

That is a ridiculous way to store the date-time (as a 32 bit integer). It is an absolutely crazy format.
This is a really interesting (and terrible) problem.
Thanks for writing this up.
Also, if they had only used a 32 bit unsigned integer, I believe the problem wouldn't have occurred (yet) either, right?
How did you learn about that?

Collapse
 
mcsee profile image
Maxi Contieri

I learnt it on reddit.

Storing dates as integers, unsigneds, floats, strings, json whatever leads to the same problem sooner or later.

Dates are Dates
Strings are Strings
People are people
Bank accounts are bank accounts.

Shouldn't be so difficult to understand