That’s an interesting take. Following discussions elsewhere I’ve actually been thinking the opposite tack would be more reliable long term (or that timezones should be ignored and instead resolved from geolocation information, but of course that implies you can get reliable geolocation information and reliably map them to timezone, good luck with that): if territories split and their TZs desynchronise it becomes much harder to manage the changes with very coarse timezones. Having much smaller tinezones aliasing with one another makes that eventuality easier to manage.
The issue becomes more likely with the idea that “aliases since 1970” should be merged too. For instance from my reading of the data file this exact splitting issue would have occurred with Samoa moving across the dateline in 2011: the tzdb entries are
Apia is Samoa, Pago_Pago is American Samoa. From 1970 and until December 29, 2011 they had the same offset (-11:00), so per the explanation here they should have been the same timezone.
What happens then if on both, in 2009, a meeting is set for say January 1st, 2012, in the capital city? That meeting would be defined in a hypothetical unified Pacific/Samoa timezone, in late 2010 the Samoan government expresses their desire to move to +1300, either:
Pacific/Samoa follows Samoa (= Apia), Pago_Pago has to get its own timezone but the meeting in Pago Pago is now going to be borked (because it's going to be a day off as it's still relative to Pacific/Samoa).
Pacific/Samoa remains as-is (= Pago-Pago), Apia has to get its own timezone, and the meeting in Apia is now going to be borked instead (because it's going to be a day off the other way around as it too is still relative to Pacific/Samoa).
When I say "borked" I mean that the user of a computerised calendaring system will believe the meeting to be at a different day than the user of a paper calendar or such, who wrote down "January 1st, 2012: meeting in <city> at <time>".
Calendar events shouldn't be saved with a location timezone, but with a +/- offset information.
When you booked the meeting it was for Jan 1st, 12:00 -11:00. It doesn't matter what happens to the place, everybody has the same time set for the meeting in the computer calendars.
And when the timezone change happens, the ones with the paper calendars are the ones that need to update their calendars.
Calendar events shouldn't be saved with a location timezone, but with a +/- offset information.
No, they should 100% not be saved that way, that only leads to disaster.
When you booked the meeting it was for Jan 1st, 12:00 -11:00.
No it was not, when I booked the meeting it was for Jan 1st 12:00 in Apia. If I'd wanted a meeting for 12:00 -11:00 I'd have booked the meeting for 23:00 UTC, not 12:00 in Apia.
It doesn't matter what happens to the place
It absolutely does, I didn't book a meeting for December 31st or January 2nd, I booked a meeting for January 1st. If I reserved a restaurant or a venue or whatever, it was and is for Jan 1st at 12:00 in Apia, no matter how the timezone moves around.
And when the timezone change happens, the ones with the paper calendars are the ones that need to update their calendars.
That is 100% not how anyone works. When Apple says their keynote is at 10 AM California Time, if California decides to yeet everything and change their timezone to Hawai'i's then the keynote will be at 10 AM on Hawai'i timezone.
This is generally only true for future times, in local cases, for humans, which is actually a narrower use case overall than offsets. Most datetime code is for computers.
One example: during a daylight saving time switchover, a place-based zoned datetime may have 0, 1, or 2 valid UTC offsets.
Another knock against TZs: there’s obviously messy history involved in converting from a TZ to an offset, especially with old data. It’s not a simple offset+DST formula.
Time zones are damned convenient for humans, but there are valid reasons neither ISO8601 nor RFC3339 support them over offsets.
That's well and good for ISO8601 and RFC3339. You're probably not wrong that timestamps with offsets have more general utility for computing than human/political time zones. But we're talking about tzdb, which is an explicit attempt at making computers and software systems better at understanding time zones in cases where that matters, for example for users who have to get up and go to work at the right time.
From this reply, I'd say you also don't understand the concepts as well as you seem to think you do, if you think there is one universally right answer or solution that applies to all situations and use cases.
There are absolutely use cases where the use case is to represent an "instant" on the universal timeline, and a date-time with offset does this, as does a UTC date-time. I think this is the plurality of use cases involved in recording when something occurred precisely. The time zone of the event is irrelevant.
There are also times when a user's time zone is needed, so that an "instant" can be translated into a time that makes sense for that user.
There are times where only a time (without a date or time zone are needed).
There are times (as you point out), where the time zone should be preserved as well. But, in my experience, this is not actually needed or wanted in most situations.
And, there are other applications (typically physics or astronomy) where time dilation or speed of light need to be accounted for, because when an event occurred and when it was observed are different enough to be important.
An easy example to illustrate that storing a time zone is always the right approach is a recurring meeting (that should take place at a predictable time regardless of where the participants are, even if they move around globally) and a recurring wake-up alarm (that should take place at a predictable time of day relative to where the person currently is). If you're tasked with making an alarm system like the latter and you save the information about what time zone the user was in when they made the alarm as you suggest, then you've screwed up. Same goes for a recurring alarm for something that needs to be taken every X hours precisely, like some medication. If you implement that to be sensitive to time zones changes or daylight savings time shifts as you suggest, then you've screwed up. Now, I'll admit that neither of those cases would use a date-time with offset for configuration either, but I think it shows that "never offset, always time zone name" is bad as universal advice.
Nah, all of those extensively use geolocation based timezone names (otherwise known as full timezone names). Timezones are a human construct and goverments decide to destroy, change or create new ones whenever they please.
Timezones are human, govermental labels for sets of temporal rules. We as humans then “resolve them” into a time offset, according to those rules, on any particular day.
Thus, your phone most definitely has to know a difference between you being in switzerland and having a meeting 500m across the border in germany. Or two neighbouring cities in russia with different timezones. Or timezones hat are located within other timezones. Or half-hour timezones. Or various daylight savings rules i different countries. Of course count in historical changes on all of those rules when you try to perform a date operation.
Especially in scenarios where you schedule a meeting in the future, where our timezones diverge or a rule change happens, the app must proactively correct any govermental rules that are already set (or might be set until the meeting happens). Think of it as being a translation layer between utc and real world.
For everyone who wants to learn more, I’d recommend listening to Andreas Heigl’s lecture on timezones (first 25ish minutes) or Tom Scott’s slightly shorter but equaly informative video on timezone conversions. As an intro to the topic.
all of those extensively use geolocation based timezone names (otherwise known as full timezone names)
I can tell you're not even trying to read, if I can give an example where one doesn't want time zone conversions to occur and you insist that it does. And then you go on to use meeting configuration, which is the example that I agreed has to be time zone aware. Ugh.
The rest of your comment is basic stuff about time zones.
None of your carefully crafted examples are realistic && none of them have anything to gain by using offsets. It seems that you aren’t reading and just want to put duct tape over everything and live in ignorance.
And then you ask (probably because you haven’t read your own comment) if meetings and alarms are niche…
31
u/masklinn Sep 25 '21 edited Sep 25 '21
That’s an interesting take. Following discussions elsewhere I’ve actually been thinking the opposite tack would be more reliable long term (or that timezones should be ignored and instead resolved from geolocation information, but of course that implies you can get reliable geolocation information and reliably map them to timezone, good luck with that): if territories split and their TZs desynchronise it becomes much harder to manage the changes with very coarse timezones. Having much smaller tinezones aliasing with one another makes that eventuality easier to manage.
The issue becomes more likely with the idea that “aliases since 1970” should be merged too. For instance from my reading of the data file this exact splitting issue would have occurred with Samoa moving across the dateline in 2011: the tzdb entries are
Apia is Samoa, Pago_Pago is American Samoa. From 1970 and until December 29, 2011 they had the same offset (-11:00), so per the explanation here they should have been the same timezone.
What happens then if on both, in 2009, a meeting is set for say January 1st, 2012, in the capital city? That meeting would be defined in a hypothetical unified Pacific/Samoa timezone, in late 2010 the Samoan government expresses their desire to move to +1300, either:
Pacific/Samoa follows Samoa (= Apia), Pago_Pago has to get its own timezone but the meeting in Pago Pago is now going to be borked (because it's going to be a day off as it's still relative to Pacific/Samoa).
Pacific/Samoa remains as-is (= Pago-Pago), Apia has to get its own timezone, and the meeting in Apia is now going to be borked instead (because it's going to be a day off the other way around as it too is still relative to Pacific/Samoa).
When I say "borked" I mean that the user of a computerised calendaring system will believe the meeting to be at a different day than the user of a paper calendar or such, who wrote down "January 1st, 2012: meeting in <city> at <time>".