3 ms·
That only works if a timezone doesn't split in the future. Like a city in germany changes its timezone. Then the Europe/Berlin you've stored is wrong. I admit,
by n_plus_1_acc 2y ago
That only works if a timezone doesn't split in the future. Like a city in germany changes its timezone. Then the Europe/Berlin you've stored is wrong.
I admit, it unlikely, but it's been known to happen.
- lxgr 2y agoBut you're storing a timestamp, so you can at least theoretically look up historical time zone rules based on place and time. The only real problem would be geographic boundaries changing, e.g. two states currently sharing a time zone and DST rules diverging. That's why the TZ database uses cities, not states or countries, to designate time zone information. It's still not bulletproof (not all cities exist in the TZ database obviously, and collecting that information can be very tricky too), but it's pretty good compared to the alternatives.