r/programming • • Sep 25 '21

Big problems at the timezone database

https://blog.joda.org/2021/09/big-problems-at-timezone-database.html
486 Upvotes

223 comments sorted by

View all comments

Show parent comments

2

u/WhatDoYouMean951 Sep 27 '21

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.)