I wonder if this will break anything. Some systems make the bad assumption that timezone abbreviations are unique, e.g. when parsing dates.
I wonder if this will break anything. Some systems make the bad assumption that timezone abbreviations are unique, e.g. when parsing dates.
https://en.m.wikipedia.org/wiki/Tz_database https://news.ycombinator.com/item?id=10032498
But you should under no circumstances record the offset. Record either a timestamp or local time + location.
But at the last minute, the government announces it's happening on March 4. And your systems haven't yet been updated to reflect this.
So humans move their clocks forward one hour on March 4.
You write somewhere in a text field "March 4 4pm".
"March 4 4pm America/Los_Angeles" doesn't help you, because it's not clear whether you thought "America/Los_Angeles" was -0800 or -0700. And it's not clear whether the system interpreting that date agrees with you.
To be unambiguous, you need to say "March 4 4pm -0700". Otherwise the system might assume the effective timezone is -0800, per the rules it knows. Without unambiguous input, correctly parsing such times is impossible.
You could also use Olson timezones for past events, but then you'd also have to record which version of the timezone rules you were using. And of course nobody does that because it's overcomplicated and unnecessary.
You're right that converting back to 4pm for display is problematic. The simplest solution is to always display UTC. But if you want to convert to the user's preferred timezone, during this time, yes, the system would display 3pm until it got the updated timezone rules. There are more complex solutions, but for most use cases just displaying "March 4 3pm -0800" would be adequate.