I can think of lots of reasons why it was made: sorting ints is fast, storing them is compact, etc.
Of course, but in that case you would just store it as a normal date/timestamp value, e.g. ms or sec or heck even days since the epoch, truncated to days. Formatting it as a format string and then converting to an int is the part that's so weird.
You need to store two separate values for a zoneless datetime. Days since epoch and minutes/seconds since midnight. You can't do it with one integer without mixing it somehow.
Comments
Of course, but in that case you would just store it as a normal date/timestamp value, e.g. ms or sec or heck even days since the epoch, truncated to days. Formatting it as a format string and then converting to an int is the part that's so weird.
You need to store two separate values for a zoneless datetime. Days since epoch and minutes/seconds since midnight. You can't do it with one integer without mixing it somehow.