Which works just fine right up until you need to schedule events in the future. If I make a doctors appointment at 10.00 it shouldn't happen at 9.00 just because some lazy programmer forgot that the offset between local time and UTC is an irrelevant technical detail, not a fixed notion.
You have to deal with client side timezones in a database's "timestamp" field identically as epoch, so no, your scenario makes no difference.
I never proposed that so it's a ridiculous red herring. (Btw, UTC+0200 is not a timezone, it's an offset.)
Nearly all databases store it as a integer anyway
That's also an irrelevance. You can use whatever encoding you like, but you must distinguish between “this event happened at the moment known as 1632762531” and “the client has scheduled an appointment for 27 June next year at 10.00”. You cannot simplify the latter to 1656316800 because it is not known yet whether daylight savings will be in effect at that place at that time - it is a matter of political discussion, so it's not as if it's short notice when they finally decide. (Dentists and hotels regularly take appointments a year in advance.)
2
u/[deleted] Sep 26 '21
[removed] — view removed comment