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

152

u/[deleted] Sep 25 '21

Secondly, the correct approach to solving a fairness/equity problem is to level up, not level down. ie. Most leaders would want to improve the worse performers on the team, not force the best performers to be as bad as the worst.

Why can’t we add more location points for places like Africa? It seems reasonable and we’re not dealing with 1970s limitations on disk storage/memory size. And even if we had to consider such, the best approach is to make a “micro” specification only for those constrained cases, not for everyone.

Something seems really damned off here and the “fairness” thing sounds like a convenient smoke-and-mirrors obfuscating reason.

21

u/happyscrappy Sep 25 '21

It's not even adding more location points, it would be about not deleting one. They are deleting one because the database is only for 1970 and later and the two time zones are identical since 1970.

The problem is that there is another database for pre-1970 and people tend to use the same keys to index into them. This will be harder to do after this change.

This database is used in many systems and some of them still have small storage.

-4

u/Beaverman Sep 26 '21

That seems like an easy fix then. Split the database at 1970, and make a giant list of all keys and what key you can use to look them up in the respective database. If you want a generic key, you go to the master list (which includes tons of historic and redundant keys) which you can then translate for the time period you want.

-4

u/TaskDifficult7247 Sep 26 '21

This has nothing to do with 1970's limitations and the author is beating the drum to the wrong cause, and i really hope he doesn't get his way.

This is absolute basic typed programming 101. If you don't understand the technical argument that is fine, but don't take a (political) position and pat each other on the back.

Because apparently people here are more familiar with SQL than Types i'll try and explain in terms of tables and not in terms of enums.

You have a (small relatively FIXED) of rows in your master record.
There is a secondary table which maps a name to a row in the master record.

At the moment there is a historical accident in the master record. First, the primary key of the master record is a String instead of an Int. Secondly the value of the master record is repeated in various rows.

Now there are people in your organization abusing the fact that the master record has a descriptive name for its primary key.

There are two solutions going forward:

  1. Make the db admin add (an unbounded number of) new rows with duplicated data until he is forced to rewrite everything from scratch using a secret master table,

  2. Allow him to say: "I made a mistake, i'm going to ask our users to stop abusing primary key in the db so i can merge some rows in the master record and we can add extra entries to the secondary table"


P.S. ( Yes i know there already is a secret master table but there doesn't have to be with this chance, and his job is to keep the master records correct, not to play politics with what we name things)

4

u/[deleted] Sep 26 '21

That does make sense of an architectural mistake.

Failure to make a more graceful plan to transition away from such an architecture is a big mistake bordering on incompetent.

Furthermore, there’s a fear/concern (might be quite justified) towards unbound additions. I accept the architectural mistake, I find the unbounded argument less convincing because it depends on human political decisions, not some automated process that WILL be a problem.

Still, let’s assume that fear is justified and apply the least harm approach to fix this.

Facts:

  • there are existing use cases for the existing system; this means that they must be migrated off if they can and frozen with increasingly inaccurate data if they can’t.

  • there’s an architectural mistake that must be corrected eventually

This means a new specification with a medium term (1-3 year) plan to address:

  • ending the current system; giving stakeholders time to upgrade

  • splitting out the legacy use cases

  • fixing the code

Notice how “fixing the code” is the last step - that’s because an enormous amount of people will be affected and something this fundamental should not be changed as quickly as a 0.X.Y versioned project.

Again, this is accepting a face value your technical arguments.

The project leader should have written what you wrote, not some nonsense appropriating social justice terminology which was wholly a disservice to actual social justice initiatives.

-75

u/darthcoder Sep 25 '21

More wokeness that only punishes Europe?

21

u/tanokkosworld Sep 25 '21

Explain how this punishes Europe.

-37

u/rydan Sep 25 '21

Well services rely on time zone data to operate and serve customers. This would allow those services to offer more consumer centric UI to those countries (e.g. time zone localization is a frequent request my business gets which serves people all over the world). This reduces friction and means more are likely to use the product from that country now. But there are capacity limits. So a customer from Africa means one less from Europe.

6

u/rickyman20 Sep 26 '21

This isn't a zero sum game. Adding support to Africa doesn't somehow remove support from Europe, especially from something like this database where you really should only ever add to it

194

u/jabiko Sep 25 '21

So after reading the list archive a bit it appears to me that almost all participants think that this change is a bad idea or at least that further discussion is necessary.

The timezone db editor however seems to be hellbent on making this change and making it fast. The reasoning is a bit odd at times: http://mm.icann.org/pipermail/tz/2021-September/030672.html

83

u/[deleted] Sep 25 '21

I wonder if this would even be a discussion if he wanted to replace US timezones with Mexico City, since, y’know, mexico is bigger than Ausin TX

207

u/ApatheticBeardo Sep 25 '21

"Do I really have to explain this?"

Clown alert.

77

u/cleeder Sep 25 '21

"Do I really have to explain this."

is just code for

"I can't really validly explain my position. Please don't make me explain this."

15

u/[deleted] Sep 26 '21

Sometimes it is just "I expected you to know that because you do X for a living"

But "if you don't know this please read X Y and Z" is generally more helpful answer.

→ More replies (4)

35

u/crusoe Sep 25 '21

Can't they simply recall the current admin and vote in another?

32

u/wtf_apostrophe Sep 25 '21

An informal appeal was made by Stephen (the author of this blog post) which was rejected.

I don't have any particular horse in this race and could go either way, but I find Paul's arguments to have merit. Stephen is one of the loudest dissenters of this change on the mailing list, which is just worth bearing in mind before jumping to conclusions.

1

u/yitz Sep 26 '21

It was not a rejection of the appeal. It was a rejection of an informal request for a "summary judgement" of sorts, before launching the formal appeals process.

It seems clear at least from the various cross-post reddit threads on this topic that there is a strong consensus among software developers against this decision of the TZ Coordinator. I hope the appeals process moves forward.

0

u/[deleted] Sep 25 '21

[deleted]

32

u/wtf_apostrophe Sep 25 '21

Not knocking Stephen or anything; his arguments are certainly valid too. Just trying to make the case for not making judgements when you've only heard from one side of the argument.

Trouble is, pre-1970 data is effectively out-of-scope for the main TZ database and probably ought to have never been included. If your use case requires pre-1970 data then you should be using the backzone file.

Whether it's right to remove that data now is a different question, which thankfully is not my problem to tackle. :)

19

u/StabbyPants Sep 25 '21

the case for not changing things is that the current system works, and the sole advocate for change is unwilling to persuade people to his cause. no agreement that there is a necessity to change or that this is a correct change = no change

1

u/awesomeusername2w Sep 27 '21

But it works inconsistently now. It might work for your country but it doesn't for another. If some apps use this for their historical data things, then they show wrong info for some set of requests and right for another. Seems like relying on this db for pre 1970 dates is the mistake of the downstream apps in the first place.

4

u/isHavvy Sep 27 '21

Unfortunately, people rely on all sorts of things they're not supposed to. Changing things that people rely on for purely purity reasons is always a terrible idea.

1

u/StabbyPants Sep 27 '21

so you can make a case and not just push forward with w/e plan you think up first.

If some apps use this for their historical data things

is this another term for 'zone that's been stable since 1968'?

→ More replies (6)

0

u/[deleted] Sep 26 '21

[deleted]

6

u/wtf_apostrophe Sep 26 '21

My point is that Stephen is not an outside observer reporting what's going on; he has a real stake in this. Namely, as the maintainer of Joda he has to deal with the fallout of this change. Does that mean we shouldn't listen? Of course not. His opionion holds a lot of weight. But we should be cognisant of the fact we're only hearing from one side of the argument before reaching conclusions.

1

u/goranlepuz Sep 26 '21

They probably just meant what they wrote? Reading only one side of a point and jumping to conclusions happens all too often.

0

u/[deleted] Sep 25 '21

[deleted]

7

u/[deleted] Sep 25 '21

So like how all databases store timestamps? I guess surely no one uses those

0

u/[deleted] Sep 25 '21

[deleted]

0

u/[deleted] Sep 26 '21

[deleted]

1

u/rickyman20 Sep 26 '21

Not all date data is stored in Unix timestamps, even to this day. Some people still use local time. Sure, people shouldn't be doing it, but they still do.

98

u/Laugarhraun Sep 25 '21

If we give COVID-19 shots to people in San Francisco but not Los Angeles, purely for reasons unrelated to public health, we are being unfair

But then we should give shots to people in LA, instead of stopping giving shots to people in SF...

→ More replies (10)

40

u/lamp-town-guy Sep 25 '21

That link sounds so stupid. I think this person is not suitable for that role anymore whatever his history might be.

41

u/darthcoder Sep 25 '21

Can confirm. Irrational shift from technical issue to covid and vaccine fairness.

Africa isn't hurt by Oslo having a Tz entry, just give major African cities one as well. This is such an easy issue to solve.

Deleting things is often the worst choice.

13

u/[deleted] Sep 25 '21

Africa isn't hurt by Oslo having a Tz entry, just give major African cities one as well.

Right, and isn't that the right solution anyway? Africans are still going to have to select some European city anyway if they are in the Berlin timezone. I'm not sure how making them select Berlin instead of Berlin or Oslo is really helping them at all.

0

u/[deleted] Sep 26 '21

Think he needs to be fired

-14

u/Sebazzz91 Sep 25 '21

Not entirely following this. Is this the same kind of "wokeness" that suddenly in a hurry encouraged everyone to rename their "master" branch in git to "main" etc? This change was also pushed through and any comments against it were silenced or ignored on Github.

63

u/turunambartanen Sep 25 '21

Is there any disadvantage to having more aliases? IMO every country should get to have a timezone label.

65

u/psayre23 Sep 25 '21

I believe there are two problems:

(A) More aliases means more to keep track of, more that can go wrong.

(B) You’d be keeping track of every country on the planet since 1970, which is not as easy as it sounds. What do you do with Hong Kong (politically ambiguous), USSR (collapse), South Sudan (civil war), Ukraine (annexation)? By tracking countries, you’d also have to track political and military events, and take a stance on recognition.

You could avoid these problems by picking a large city in the same time zone that has the same time history.

49

u/[deleted] Sep 25 '21 edited Sep 25 '21

Taiwan would have been a better example of ambiguity since they won't formally declare indepedence. Nothing ambiguous about Hong Kong. It changed according to treaties at fixed well defined times.

Anyway, you're right that a finer grained system than countries are needed. Cities are better but still have their problems. Some of them have 2 time zones because of geography or because they contain 2 different communities and their governments don't dictate which to TZ is "correct".

-20

u/[deleted] Sep 25 '21

It's almost like time zones and political boundaries shouldn't be interdependent..

47

u/[deleted] Sep 25 '21

Time zones are an inherently political mechanism, and are used for that purpose even today. See: Beijing time vs Tibetan local time, Israel/Palestine DST switchover, Navajo/Hopi/Arizona DST policy, Kiribati and Samoa changing IDL side to better schedule business with Australia...

-8

u/gajbooks Sep 25 '21

Using UTC for international business would resolve 90% of political cases. Politicians just "solve problems" by messing with apparent artifacts of time instead of, maybe just maybe, adopting the standard that would work for every location on Earth, as well as literally in space or on other planets. Yes, learning to think in UTC would be a pain, but it's less of a pain than random terrible time zones.

23

u/MrKapla Sep 25 '21

That would not solve anything. The main questions to answer for international business are "is that time in the business hour of far away city?" or "is my correspondant awake at that time?"

UTC does not help with that, you would need to keep track of the business hours of each country expressed in UTC, which is not simpler than keeping track of the timezones.

2

u/gajbooks Sep 25 '21

If your locations are far enough away that they need time zone fanagling, they might have different work hours anyway, because, you know, daytime might be at a different time. In terms of the International Date Line, UTC would be fine, since they're close enough in terms of real daytime, but the artificial date line puts them in different days so all the timestamps get wonky, which is why they changed it in the first place.

3

u/donalmacc Sep 26 '21

Lots of places don't tie working hours to daylight. I'm in Scotland where we get 7 hour days of daylight in peak winter (and even at the reality is often less). That doesn't mean a 9 to 5 office closes at 3:30pm because it got dark. I also work with people in 4 different time zones to mine (+1 to -8 relative), and the local working hours are very close to mine - usually within an hour or two. The answer to "is someone in X time zone working at 10am" is likely yes. The answer to "is person in city X working at 3pm UTC" is "uh I dunno, let me check a computer so I can see what time sunrise is and how long their day is so I can maybe try to infer I'd they're working". Timezones aren't perfect, but they're pretty damn good for many many uses.

-2

u/[deleted] Sep 25 '21

To be fair, they have a point. The whole of the PRC uses a single time zone and they've obviously managed work it all out without the clocks exploding or people being late.

2

u/MrKapla Sep 26 '21

That's exactly my point. Even only within China, it gives rise to the mess that is time management in Xinjiang: https://en.m.wikipedia.org/wiki/Xinjiang_Time

1

u/WikiSummarizerBot Sep 26 '21

Xinjiang Time

Xinjiang Time (Chinese: 新疆时间; pinyin: Xīnjiāng shíjiān), also known as Ürümqi Time (Chinese: 乌鲁木齐时间; pinyin: Wūlǔmùqí Shíjiān), is a time standard used in Xinjiang, China. It is used alongside Beijing Time, which is widely observed by the rest of the country. The time offset is UTC+06:00, which is two hours behind Beijing Time and is the same offset used by Kyrgyzstan and most of Kazakhstan. This offset accounts for Xinjiang's geographical location in the westernmost part of China.

[ F.A.Q | Opt Out | Opt Out Of Subreddit | GitHub ] Downvote to remove | v1.5

1

u/[deleted] Sep 26 '21

That's because people of particular cultures wish to use their own system, not because they can't understand a centralised time system.

1

u/Kered13 Sep 26 '21

Except in practice Xinjiang uses a different timezone because Beijing time makes absolutely no sense for them.

0

u/[deleted] Sep 25 '21

[deleted]

3

u/rickyman20 Sep 26 '21

Yes, they do work generally different hours, but within a couple of hours of a 9-5. They still work roughly during their daylight hours. Using UTC everywhere means it's even more of a pain in the ass trying to understand when that is. Sure, UTC+Timezones don't perfectly cover those three concepts, but they get pretty damn close. Just because you can't fix all three doesn't mean we should revert to something that's markedly worse for every day use.

0

u/[deleted] Sep 25 '21

[deleted]

1

u/gajbooks Sep 25 '21

You could totally use global UTC, and it wouldn't even be that hard. There is no such thing as plus or minus UTC when using only UTC. The business hours are simply different times as dictated by local people. In order to know if another business is open, you just look at the time to see if it matches, no plus or minus time zones, since it's all listed in the same "zone". A business near the meridian could be open 9-17 UTC, and one over in Europe may be open 5-13, and you can just immediately know when they're open without arbitrary zone conversions.

The biggest downside, is of course, daytime not aligning with locations consistently, but guess what? It doesn't actually matter. Nobody needs to use "noon" or "dawn" as a point of reference anymore, even for local affairs. Of course business would still follow day, but operating hours would be set locally and would make sense both locally and globally because they were in standard UTC.

Actually, it would make it easier going forward. For pre-UTC dates, you just use this database like always with no need for future changes. For post-UTC, there's no need to adapt anything anymore as they're all standard dates.

0

u/[deleted] Sep 25 '21

[deleted]

-1

u/gajbooks Sep 25 '21

Is it any harder to remember that 12 is noon vs 6 or 17 being noon? Additionally, north to south within time zones changes dawn and dusk times, and east to west in existing time zones changes noon as well as those two. China is on a single time zone out of political obnoxiousness, so in a lot of places it is already screwey. Time zones only existed in the past because there was literally no way except the sun to synchronize clocks. Now we have global timekeeping authorities and networks to keep objective time.

→ More replies (0)

13

u/Playos Sep 25 '21

But time zones are an entirely political decision, so they always will be.

10

u/turunambartanen Sep 25 '21

A: Fair point. It makes no sense to give every country an ID just because. But they should be allowed to request one. And reducing the number of aliases makes no sense to me.

B: I did not mean this as a fixed number. I meant that more as a minimum of allowed codes (if they want to have one). E.g. China could request an ID for Hong Kong. The USSR did collapse, I don't see what your point is for that one. And for the last two I don't really see any issues. If south Sudan has a government that has time to care about this stuff they should be allowed to request an ID. The Krim is not its own country. If you live there you choose whatever timezone you want to belong to or something.

9

u/Pay08 Sep 25 '21

The main problem with this approach is that in some cases you have to decide which government is legitimate.

5

u/turunambartanen Sep 25 '21

Oh, I think you understood my suggestion as turning Europe/Berlin into Germany/Berlin? I meant more as "if the devs in Luxemburg want to have a Europe/Luxemburg they should have to option to get one", because as I understood the discussion the argument was "there should only be one alias for CET and it is unfair for some countries to have one for themselves and others not, so no one should get any".

2

u/Pay08 Sep 25 '21

That'd be very hard to organise. And you'd probably need to do it worldwide instead of nationwide.

3

u/donalmacc Sep 26 '21

What if devs want Taiwan/Taipei? Or Crimea/Russia? Or if the maintainer of the open source database decides to merge two cities in the same time zone under the same label, e.g. gaza and Jerusalem.

-1

u/jrochkind Sep 25 '21

It is not hard to delegate that decision to the UN, is it?

6

u/[deleted] Sep 25 '21

Seems to me it should be perfectly acceptable to have Europe/Berlin as a primary ID and still allow as many secondary IDs as desired. As long as the maintainers keep up with the data for the primaries, every thing should be solid. If a secondary needs to be reassigned to reflect a policy change, it's a simple retarget of the ID itself. No biggie.

I'm not sure I agree with the counter argument on this.

2

u/[deleted] Sep 25 '21

This already unavoidably tracks countries. You can't escape the issues that brings up just by tracking fewer of them.

1

u/psayre23 Sep 27 '21

We don’t track countries with timezones today. The ID’s format is Region/City (for instance, America/Vancouver). When a country changes, the city name might change, but it’s point on a map generally doesn’t.

1

u/[deleted] Sep 27 '21

Not sure what you're trying to say. The argument was that if you add Hong Kong you're involving yourself in politics when Hong Kong gets renamed by China or whatever.

2

u/myringotomy Sep 26 '21

Anybody who has managed data over the last decade has dealt with similar problems many times.

There is a one to many relationship between time zones and cities. This relationship is time dependent (slowly changing dimension).

There are less than 300 cities in the USA with a population over 100 thousand people. An sqlite database could easily hold every city in the world over 100K people.

Set up an event sourcing system for changes, set up an API or just publish the changes to a static site and let all the clients sync whenever they want.

1

u/lets_eat_bees Sep 26 '21

Um, USSR is not a time zone. It had 12 of them.

1

u/seven_seacat Sep 26 '21

Surely they'd have to do that anyway, track all different cities and countries because at any time, those places could choose to change their own timezones/DST settings/whatever. Wasn't there the thing with Libya a few years ago that they decided to just not do DST with only a few days' notice? If their time zone was implemented as an alias of another city/country in the same zone, you're stuffed.

15

u/CaptainAdjective Sep 25 '21

Formally choosing which countries' existence the TZ database should recognise or not recognise opens much larger, much more horrible cans of worms. It's a good thing that this is something the database currently intentionally tries not to do (much).

1

u/carbolymer Sep 27 '21

How do you define a country?

0

u/wikipedia_answer_bot Sep 27 '21

A country is a distinct territorial body or political entity (i.e. a nation).

More details here: https://en.wikipedia.org/wiki/Country

This comment was left automatically (by a bot). If I don't get this right, don't get mad at me, I'm still learning!

opt out | report/suggest | GitHub

16

u/lwl Sep 25 '21

Dude should just call it Boslo Time and be done with it.

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

Zone Pacific/Apia
			 12:33:04 -	LMT	1892 Jul  5
			-11:26:56 -	LMT	1911
			-11:30	-	-1130	1950
			-11:00	WS	-11/-10	2011 Dec 29 24:00
			 13:00	WS	+13/+14
Zone Pacific/Pago_Pago
			 12:37:12 -	LMT	1892 Jul  5
			-11:22:48 -	LMT	1911
			-11:00	-	SST	            # S=Samoa

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

9

u/[deleted] Sep 25 '21

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

That would have to be an opt-in mechanism for various reasons. Not every device has an internet connection or a location awareness requirement, nor should that information be depended on for critical services like time data.

-24

u/Fenris_uy Sep 25 '21

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.

55

u/masklinn Sep 25 '21

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.

27

u/[deleted] Sep 25 '21

I second this. Whoever saves time offset instead of timezone names, does not fully comprehend how timezones work and should do some research.

4

u/pihkal Sep 25 '21

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.

7

u/SirClueless Sep 26 '21

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.

2

u/fishling Sep 25 '21

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.

-2

u/[deleted] Sep 26 '21

Haha I like how you had to invent an extremely unique scenario to prove a point “that something is technically possible”. :D good job guy

3

u/fishling Sep 26 '21

You think meetings and alarms are somehow niche?

0

u/[deleted] Sep 26 '21 edited Sep 26 '21

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.

https://youtu.be/lP2LqWvr5mU

2

u/fishling Sep 26 '21

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.

0

u/[deleted] Sep 26 '21

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…

→ More replies (0)
→ More replies (7)

1

u/goranlepuz Sep 26 '21

.

The problem with this is that in my mind, seeing 11h implies [my time zone]. Not having it pointed out is bad. Offset is not how non-technical people think, it is a technicality. To be frank, I want to take my technical hat off for this, too.

Probably AKA "don't make me think" design principle.

2

u/Fenris_uy Sep 26 '21

The problem is that the situation presented (a timezone divides in two) isn't a technical one, but a human one. So who gets the old name, of the appointments in the old timezone need to change into the new one, etc, it's something that humans need to define. Not just your computer, because you're computer doesn't know if the appointment is relevant just for the local timezone (which we don't know because of the non technical nature of the split), or is going to include people in other timezones.

If your appointment doesn't has location data, how is your computer going to know that it was in Apia, and now has to use the new Apia timezone? What happens if your device was abandoned and no longer gets timezones db updates?

55

u/Objective_Mine Sep 25 '21

I can see this causing practical usability problems as well. Granted, most people don't set their time zones manually, at least not often (perhaps when installing a computer for the first time), so it might not come up massively often. But imagine traveling to Norway and being offered the time zone of Berlin for your laptop, let alone having to set that manually. While technically-minded (and perhaps most other) people will quickly figure out that it's just some kind of a technicality, it's certainly bound to be more confusing than the time zone of Oslo, regardless of where in Norway you are.

I haven't read even a single thread on the mailing list in its entirety, let alone the history that could have lead to Eggert's proposal, so there could be valid logic for the change. But on the surface, it seems rather counter-productive to introduce a change in the (valid) name of fairness and equity that would probably make more people feel uncomfortable and potentially confused due to having "someone else's" time zone rather than fewer.

45

u/psaux_grep Sep 25 '21

As a developer I often use time zones. And being able to use the capitol city of a country instead of having to know which city to use makes it a lot easier.

For instance, at work, we’re running systems for Norway, Sweden, and Denmark. At the moment these could all use the same time zone, but as commented in the thread it doesn’t provide historical data.

Then there’s the upcoming possibility of a big changes within Europe were each country could choose to opt out of daylight savings time and stick with either summer or winter.

To be frank it sounds like this guy has spent too much time with time zones and gone a bit mad.

I hope I’ll be able to keep using Europe/Oslo, Europe/Stockholm and Europe/Copenhagen in the future.

12

u/darthcoder Sep 25 '21

Fuck we should all just switch to UTC. Screw time zones.

1

u/amakai Sep 25 '21

Or even better - just use unix timestamps everywhere.

7

u/Jonathan_the_Nerd Sep 25 '21

But then the world will end in 2038.

9

u/eyolfos Sep 26 '21

And you assume it won't?

3

u/[deleted] Sep 26 '21

leap seconds entered the chat

1

u/WhatDoYouMean951 Sep 27 '21

Leap seconds probably have less relevance than that. Most of the time they can be replaced by storing a start time and a duration. It is far more likely that timestamps will fail because they can only record historical times and events not associated with a location - since communities can and do change time zones/daylight savings rules, it impossible to accurately predict the timestamp of any arbitrary time at any arbitrary location. This isn't some minor consideration either; European countries are supposed to be abandoning daylight savings, but afaik none have yet.

0

u/donalmacc Sep 26 '21

For someone born today, by the time they are an adult Unix timestamps will be broken. Timezones also convey more information than just a timestamp, they contain the locale. You wouldn't store a random bag of bytes in a file and then just blindly decode it as utf-8 would you? So why would you store a number in a database and blindly assume the locale there?

2

u/[deleted] Sep 26 '21

[removed] — view removed comment

2

u/WhatDoYouMean951 Sep 27 '21

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.

1

u/[deleted] Sep 27 '21

[removed] — view removed comment

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

5

u/SirClueless Sep 25 '21

You will. This isn't about removing Oslo, this is just about making Oslo another name for the same data as Berlin since there hasn't been a difference since 1970 (unless the software you're using hides this choice, most will still let you choose "Oslo" and it will still mean mostly the same thing as it always has unless you try to look up dates before 1970).

9

u/[deleted] Sep 26 '21

But there is an 'undocumented feature' that pre-1970 dates work. Taking away functionality that works just because it isn't officially supported is bad form unless there is a really good reason for it.

6

u/SirClueless Sep 26 '21

For what it's worth, there's definitely a trade-off here:

  1. Making millions of phones and computers download Oslo timezone data to support a feature that they've already decided not to make concessions to in other regions like Africa.

  2. Supporting the small subset of users who care about pre-1970 data and for whom the early-20th century Oslo data is appreciably better than Berlin data.

There's no obvious right or wrong answer here. It just depends what users you care about most.

5

u/donalmacc Sep 26 '21

I agree on the first point but the second point is where I disagree. The problem isn't supporting the small subset of users relying on the feature, it's the breakage that occurs from the removal. As someone else pointed out elsewhere in this thread this change breaks the shared keys between this db and the historical database.

I am normally in favour of api-style breaks when there's a reason, but this is breaking an API for philosophical reasons. It's like deciding strlen is unclear in libc so renaming it to string_length. It's a perfectly reasonable thing to do, but it doesn't actually benefit anyone who has to deal with the existing name strlen

2

u/[deleted] Sep 26 '21

And that's a legitimate technical argument; it comes down to weighing the benefit from the smaller database to everybody vs the cost to the set of applications that are relying on it (and this effect is magnified by the fact that it would be breaking existing functionality). The blowback, IMHO, is coming because the administrator did not make this argument; he simply decreed from on high that if part of the world doesn't have the extra data, then none of it can.

When someone is the steward of the technology that the development world relies on, he needs to make technical decisions based on technical considerations, and be sensitive to the constituencies he is affecting. That's not what happened here; thus the dustup we are seeing.

2

u/SirClueless Sep 26 '21

He has made the technical argument in the past, when declaring that as a matter of policy they wouldn't be onboarding datasets that differ from existing zones only pre-1970. That's why his argument this time is entirely about Equity -- i.e. we've decided we won't do this as a matter of policy for every country that has a different history, so we shouldn't give preferential treatment to Oslo just because we included data from there in the past.

1

u/[deleted] Sep 26 '21

That's why his argument this time is entirely about Equity

That's not his role. He is maintaining the database for the benefit of everyone who uses the technology. If he has to make an argument about equity, he has exceeded his mandate.

we shouldn't give preferential treatment to Oslo just because we included data from there in the past

Not breaking existing functionality is not giving preferential treatment.

5

u/SirClueless Sep 26 '21

He is maintaining the database for the benefit of everyone who uses the technology. If he has to make an argument about equity, he has exceeded his mandate.

I'm sure Paul would disagree with this. He's thinking about the millions of users of his software in the coming years who will benefit from a strong, consistent policy about what data belongs in tzdb and sees them as more important than the existing downstream library maintainers who are telling him "Oslo is different, it's more economically important."

Not breaking existing functionality is not giving preferential treatment.

Would you feel that if you were a developer or user in, say, South America or Africa and found that timezone data for Europe was flawless throughout the 1900s and not only was your own data inferior, the maintainers of the largest and most critical software repository of timezone data in the world were unwilling to accept contributions even of high-quality well-researched historical data?

1

u/user-0x00000001 Sep 25 '21

Hope you never have systems in the Canary Islands

45

u/wtf_apostrophe Sep 25 '21

Part of the problem is that zone identifiers like Europe/Berlin are essentially supposed to just be a machine identifier for the zone as a whole; they are not supposed to be exposed to users. Of course, designing a user interface for selecting a time zone is not a trivial problem, so these identifiers regularly get exposed anyway.

If the database used opaque identifiers (like a UUID) I don't think this change would be as controversial. This sort of discussion regularly pops up on the list (often triggered by requests to rename Europe/Kiev to Europe/Kyiv), but it's yet to gain any real traction.

14

u/[deleted] Sep 25 '21

Just wondering what happens if Norway changes their timezone now. Everyone will be using Europe/Berlin which will be wrong.

4

u/[deleted] Sep 26 '21

[removed] — view removed comment

1

u/[deleted] Sep 27 '21

They messed that one up by letting all the member nations to decide on solutions for themselves rather choosing one solution for everyone.

0

u/jorge1209 Sep 26 '21

Rather than uuid one might use the longitude for that city since it roughly sorts it.

5

u/MrJohz Sep 26 '21

Longitude does not map particularly well onto timezones, as this chart demonstrates.

1

u/jorge1209 Sep 26 '21 edited Sep 26 '21

Neither does naming zones after big cities.

3

u/MrJohz Sep 26 '21

It doesn't map too badly. You're very unlikely to have a city that operates in multiple timezones, because most municipalities want to avoid too much confusion. You might have a single country split into multiple timezones, but a single city would be very unusual. In addition, it's also very rare that a particular timezone will contain no cities at all (why would you have a timezone that nobody uses?)

So as unique identifiers for timezones, cities turn out to work reasonably well. The same cannot be said for longitudes, because few longitudes map uniquely to one single timezone, and many timezones differ principally from each other in terms of latitude.

1

u/jorge1209 Sep 26 '21

Your complaint was that some timezones (particularly China) seem to defy longitude, but that is just as true of cities. Chicago is probably the designated city for US Central but it's easy over in the edge of the zone. If you live in nearby Michigan you might think "I should select Chicago as the nearest city".

Again the point here is that you should not display these names. These names should be internal to the application. The timezone picker would be forced to use an additional mapping table of zones to polities if the names were incomprehensible to the average person.

2

u/MrJohz Sep 26 '21

Yeah, I don't disagree about using internal IDs, and not showing them to the outside application. My point is that, if you're not going to do that, cities turn out to work surprisingly well for that role (as they are largely unique identifiers that mostly identify political regions), and longitudes turn out to work especially badly for that role (because longitude does not map well to the political boundaries between time zones).

In my experience, people who live on time zone boundaries tend to understand those boundaries fairly well, although I can see that being an issue. That said, I'm not defending the choice not to use opaque identifiers here — that would have probably clarified some of the confusion here.

7

u/roboticon Sep 25 '21

I can see this causing practical usability problems as well.[...] But imagine traveling to Norway and being offered the time zone of Berlin for your laptop, let alone having to set that manually.

The time zone aliases aren't going away. You'll still be able to find Norway in your laptop or phone settings. It's just the pre-1970 history that is being erased.

30

u/andrewsmd87 Sep 25 '21

I'm a simple programmer. I see time zones mentioned, I run

10

u/[deleted] Sep 25 '21

Silly question, does that mean that Oslo never had any difference with Berlin with daylight saving time? What if they do switch on a different day just one time next year, wouldn't they need a separate record then?

12

u/rislim-remix Sep 25 '21

Since at least 1970 they have always matched in DST. And yes, if they were to switch on a different day one time, the records would have to be split again. But European countries have synchronized their DST switch for decades, so I don't think that will happen. What's more likely is one country abandoning DST completely while the other doesn't.

6

u/jorge1209 Sep 26 '21

I can imagine many countries might be willing to officially step forward one second at midnight and come back the next just to ensure they preserve a national entry in the database.

Can you imagine if Trump knew about this/had the power to do it... There would be an entry for every one of his golf courses and hotels and condos...

7

u/roerd Sep 25 '21 edited Sep 25 '21

Germany and Norway both reintroduced daylight savings time (resp. summer time, as it's called in Europe) in 1980, after it had previously been abolished after 1949 in Germany and after 1965 in Norway. Since the reintroduction was in the same year, I would strongly assume that this reintroduction was coordinated, and the days it started and ended have therefore been the same ever since.

19

u/Dwedit Sep 25 '21

If at any time you allow more than one entry for a given time zone, then there's no longer any good reason to delete them.

8

u/jorge1209 Sep 26 '21

This seems easily solved. Norway should for one second at midnight move their clock forward one second from Berlin, and the next second move it back to Berlin time.

21

u/Pelera Sep 25 '21

(The official project rules say that there should only be one ID for locations where timezone data is the same post-1970. Country borders simply dont matter.)

I am highly curious why the rules were defined this way, and despite an attempt at looking, I can't seem to find any motivation for it. Keeping things split as much as possible seems like a no-brainer. Especially right now while many countries are in the process of reconsidering the value of DST, but are all doing so independently.

17

u/fishling Sep 25 '21

Very much agreed. I don't think needless proliferation of a time zone per country is desirable, but aggressive pruning to match an arbitrary rule that breaks backwards compatibility is not desirable either.

4

u/[deleted] Sep 26 '21

Eh, even if it was entry per each of country's timezone it's still well below thousand

4

u/fishling Sep 26 '21

I think they also wanted to avoid political implications of having certain entries.

1

u/Pand9 Sep 26 '21

You're talking about a database that is replicated to every device using timezones in the world, big and small. It's not a no brainer to add hundreds of records. Most users won't be affected but it's not a no brainer. Think also from trust perspective.

2

u/Pelera Sep 26 '21

As it stands the database can already be processed in about as much ways as you'd like to only keep the parts you want. You can already reduce it to purely current DST rules and offsets and if your device is truly so strapped for space you can't afford ~100KB of timezone data (approximate size of the DB in text form after comments are removed), perhaps you should.

-7

u/[deleted] Sep 25 '21

Especially right now while many countries are in the process of reconsidering the value of DST, but are all doing so independently.

I think that's the primary argument - too much maintenance.

22

u/rislim-remix Sep 25 '21

Huh??? The point of the sentence you quoted is that if, say, Germany stops using daylight saving time but Norway doesn't, then congrats, the Europe/Oslo time zone needs to get undeleted! So wouldn't it be less of a maintenance headache to just not delete the Europe/Oslo time zone in the first place?

7

u/helpfuldan Sep 25 '21

Literally one person only working on the weekends could handle it.

5

u/roboticon Sep 25 '21

Sorry, but why does this matter from a practical standpoint? Who is doing timezone calculations with pre-1970 data but isn't technically savvy enough to get the "moved" data file?

(I'm honestly curious, not disparaging!)

I acknowledge the equitability arguments, but the author of this blog post is mostly talking about practical concerns.

12

u/dutch_gecko Sep 26 '21

The historical data is there and available, and should be used if you need it. The author's issue is that the "main" database up to today has also supported doing some calculations in this period, but from today will not, and crucially the user won't know that this behaviour has become broken.

An additional wrinkle is that most software will use a timekeeping library like Joda, but that the library in turn will use the operating system's copy of the TZInfo database, and the two are not necessarily in sync. So Joda can be updated to deal with the new behaviour. but if the operating system updates the time database before a piece of software updates (and is installed by the user), then time calculations will be silently broken.

4

u/roboticon Sep 26 '21

Oof. You don't think about the system's tzinfo being the source of a breaking change but obviously it does get regular updates. Yikes.

Still, though... relying on your operating system's time zone info (or the default stuff from your toolchain) seems like a bad idea if you're literally working with half-century-old data.

And it's not like there's much data from the 60s with these time zones built in anyway, right? Still having trouble thinking of widespread concrete use cases.

4

u/[deleted] Sep 26 '21

Still, though... relying on your operating system's time zone info (or the default stuff from your toolchain) seems like a bad idea if you're literally working with half-century-old data.

The alternative is all of the software shipping its own and possibly getting out of sync with eachother.

1

u/roboticon Sep 26 '21

Do pre-1970s timezones change often?

9

u/pizzaburek Sep 26 '21 edited Sep 26 '21

Wow, I found this on Wikipedia page about daylight saving time in United states:

From 1945 to 1966 there was no federal law on daylight saving time, so localities could choose when it began and ended or drop it entirely. What emerged was a complicated patchwork of daylight saving policies that varied in length and by city, state and municipality.

So basically if you're an American, it is understandable that you see a pre-1970 timezone data as a huge mess that just can't be captured perfectly and efficiently (there would need to be thousands of timezones in the USA). It's interesting to think that this could have some influence on this development, as the project lead is American, while the OP is from UK.

3

u/[deleted] Sep 25 '21

Well that's one thing I didn't think I ever had to be concerned with that I now am

6

u/[deleted] Sep 26 '21

Jesus Christ... Fairness? Equity? Timezones are not people, for crying out loud. They don't have feelings. All this woke shit is really going to people's heads. This is not progress.

4

u/tms10000 Sep 26 '21

What is driving the change? Well this is where it gets really weird. The TZ Coordinator's argument is that there is a fairness/equity problem if Oslo is allowed to keep its pre-1970 history but other locations (typically in Africa) are not.

Has anyone ever complained about Fairness/Equity when it comes to resolving time zones? The label is a convenient human shortcut tied to common cultural background. i.e. Oslo is a lot easier to remember than a lat/long coordinate boundary. Nobody has ever complained they need to pick "Los Angeles" when they setup their computer even though they live in Spokane, WA

This is totally bonkers.

3

u/vattenpuss Sep 25 '21

As someone who lives in one of these time zones (Europe/Stockholm) I never understood the zone names. I have never heard of them outside of computing.

We use a time zone called Central European Time, CET (or CEST in the summer, well at least until 2021). I don’t understand the city aliases, they only add confusion.

Get rid of Oslo and get rid of Berlin, if you need to save on maintenance.

10

u/[deleted] Sep 25 '21

We use a time zone called Central European Time, CET (or CEST in the summer, well at least until 2021). I don’t understand the city aliases, they only add confusion.

Well for one, the city aliases don't have different versions for daylight/normal time.

7

u/evaned Sep 26 '21 edited Sep 26 '21

We use a time zone called Central European Time, CET (or CEST in the summer, well at least until 2021). I don’t understand the city aliases, they only add confusion.

The city aliases encompass a lot of additional things. For example, "Europe/Berlin" encompasses what you just said -- it's on CET, or CEST, as well as the rules (what dates) that location moves between those two different time measures.

Take a concrete example I'm more familiar with. Most of Indiana follows the eastern US -- it is on Eastern Standard Time (EST) in winter and Eastern Daylight Time (EDT) in summer.

But this hasn't always been the case -- Indiana used to not observe daylight saving time, so was on EST year-round. (In summer, this meant aligning with CDT.)

If you want to work with times from these locations, you have to know not just the time zone but the rules for how a location changes between time zones. (I'm not sure if "EDT" and "EST" are technically different time zones, but I don't know what the right word here is, so I'll just stick with that.)

For example, suppose you want to know what one day following 1pm EST on April 1, 2000 is. Note that I'm telling you date, time, and time zone in that, but I'm still not giving you enough information to answer the question. If you are in in America/New_York, the answer is 1pm EDT, April 2. If you are in America/Indianapolis, the answer is 1pm EST. Why? Because America/New_York made the change from EST to EDT at 2am April 2, 2000, but Indiana did not.

That's why just knowing the time zone, in the sense of EST/EDT/CET/CEST/etc., is not sufficient.

5

u/mo_tag Sep 26 '21

Also they're not really unique. For example BST could be British summer time or Bangladesh standard time

13

u/w2qw Sep 25 '21

You might live in one of the few areas where this would work at least for current times. For example though in NSW, Australia we use AEST normally and then AEDT in summer but if you just set your computer to AEST it wouldn't know whether it need to switch in summer because Queensland also uses AEST but doesn't have daylight savings.

0

u/[deleted] Sep 26 '21

[deleted]

2

u/swansongofdesire Sep 27 '21

then make it know?

They already did "make it know".... by using city-based timezones.

A label like "AEST" or "CST" is just a shorthand for +10:00 or -2:00. That's not enough to tell you when daylight savings should apply.

A city-based timezone is a collection of fixed offsets, labels (eg AEST, CST) and the UTC ranges during which they apply. That works perfectly well to tell you exactly what the UTC offset is any any point in to.

If you think this is just a "bullshit issue" then please tell me an alternate mechanism by which I can tell eg Windows what UTC timezone offset it should use for all times since 1970.

0

u/w2qw Sep 26 '21

What are you on about?

0

u/[deleted] Sep 25 '21

[deleted]

5

u/vattenpuss Sep 25 '21

The only benefit to the place names is when you want the historical time in a particular place at a time that predated a standard like CET.

But only if by history you mean the last 50 years, it seems, according to OP. Before 1879 here in Sweden different cities had different time zones, so Stockholm is not enough.

1

u/[deleted] Sep 26 '21

Time is flexible and subjective. That's what special relativity says, certainly, as does lived human experience. Trying to track time is always going to be messy.

For example, it's well known that if you fly two airplanes in opposite directions around the Earth, atomic clocks onboard both planes will de-synchronize due to relativity. So, what time zones are they in then? Which one (if either) now has the 'correct UTC time'?

2

u/swansongofdesire Sep 27 '21

Was there a /s missing or was this a serious question?

Which one (if either) now has the 'correct UTC time'?

UTC is whatever the ITU defines it to be.

1

u/WikiSummarizerBot Sep 27 '21

Coordinated Universal Time

Coordinated Universal Time or UTC is the primary time standard by which the world regulates clocks and time. It is within about 1 second of mean solar time at 0° longitude and is not adjusted for daylight saving time. It is effectively a successor to Greenwich Mean Time (GMT). The coordination of time and frequency transmissions around the world began on 1 January 1960.

[ F.A.Q | Opt Out | Opt Out Of Subreddit | GitHub ] Downvote to remove | v1.5

-14

u/pizzaburek Sep 25 '21

Please watch this video before you write a comment: https://youtu.be/-5wpm-gesOY

-2

u/cmt_miniBill Sep 25 '21

I honestly don't get why this was downvoted. The video is a compact, funny way to present the idea "timezones are way more complicated than the average dev expects"

27

u/tsimionescu Sep 25 '21

Because it has nothing to do with this discussion. Most likely, anyone interested in commenting on changes to tzdb already understands the concept that timezones are hard .

9

u/pizzaburek Sep 25 '21

I think there are two possible reasons why one would downvote this comment.

First one is that it can be perceived as condescending toward the reader.

And second one is that it can be interpreted as siding with TZ coordinator via appeal to authority because the video ends with:

"And what you learn after dealing with timezones is what you do, is you put away your code, you don't try and write anything to deal whit this. You look at the people who have been there before you, you look at the first people, the people who have dealt with this before, the people who have built the spaghetti code. And you go to them and you thank them very much for making it open source, and you give them credit. And you take what they've made, you put it in your program and you never ever look at it again, because that way lies madness."

2

u/evaned Sep 26 '21

I think there are two possible reasons why one would downvote this comment.

I didn't downvote, but I thought about it on the basis of it's a low-effort comment that reads as if it were spam. I'm actually a bit surprised by these replies that it sounds like it's actually relevant.

-1

u/ImNoEinstein Sep 26 '21

woke-ism at its best. this is the beginning of shit to come

-7

u/a32m50 Sep 25 '21

guy got woke lol

-5

u/segfaultsarecool Sep 25 '21

I'm ignorant when it comes to this stuff, but why not specify lat/long grid blocks on the globe as timezones. They'd (whoever 'they' is) would need to decide what the right size of a grid block is, and set the default time for that block according to whatever international standard there is.

If specific countries in that block have different rules about time, that could be recorded in block metadata perhaps? If specific cities have differences, that could possibly also be captured in block metadata. Say a Map<Pair<Lat, Long>, TimeZoneStuff> CITY_SPECIFICS owned by a block.

I don't know if this would be a good solution, or if it's practical. I think it makes sense to use geography as the default breakdown for timezones, then defer to regional bullshit.

I didn't go back far enough, but what's the equity/fairness thing about?

10

u/masklinn Sep 25 '21

I think it'd make sense, the only issue is that it would make the timezone database much, much larger.

There is a separate timezone boundary builder which maps geography to timezones using a shapefile, and the shapefile is >35MB uncompressed. By comparison the latest tzdata is 1.2M uncompressed.

9

u/tsimionescu Sep 25 '21

That's just a needlessly sparse representation. The size of the grid would have to be small enough to account for the smallest historical regions with different timezones, which would be extraordinarily wasteful for the vast majority of the world. There are areas where an island on a lake has a different timezone than the area enclosing the lake; and then huge swathes of land with a single timezone.

-3

u/segfaultsarecool Sep 25 '21

Really? That's just dumb. Why do those areas not standardize and fit into the timezone that is correct for their geographical location?

6

u/cecilpl Sep 25 '21

Political reasons, mostly. China spans 5 geographical time zones but is all on a single time zone. Some small countries choose to be in the time zone of a nearby large trading partner for business reasons.

2

u/segfaultsarecool Sep 26 '21

That's interesting! I wouldn't have thought that people would take something that's already complex, i.e. time, and then bolt on more complexity. Although, in hindsight I should have expected that.

4

u/ubernostrum Sep 26 '21

What is “correct for their geographical location”, though? There are places with UTC offsets greater than 12 hours, for example, which seems nonsensical until you look into why. And then you can argue either for or against that as a solution to the “geographical” problem.

1

u/tsimionescu Sep 26 '21

Usually, because neither part can agree which is the correct timezone for their geographical location, especially when adding dailyght savings into account.

-25

u/schlenk Sep 25 '21

Sounds more like "implementation problems in Joda-Time". It is probably an invalid assumption for TZ identifiers to be stable forever. Timezones are political constructs and so change over time.

-21

u/fuzzer37 Sep 25 '21

Lol. Imagine caring this much about time zones

7

u/ApeFoundation Sep 26 '21

Some of us have to maintain code that handles time zones.

0

u/[deleted] Sep 25 '21

[deleted]

28

u/RadiantDevelopment1 Sep 25 '21

Consider setting an appointment for a year from now at 12 pm. Then your local jurisdiction decides to change time zones. Maybe it ends daylight saving or observes year long DST, or introduces daylight saving.

If you've only recorded Unix time your appointment will be at the wrong time! It will be start + 1 year instead of start + 1 year ± tz adjustment.

Recording 2022-09-22T12:00:00 America/Los_Angeles would yield the correct time, tho only if LA is still your time zone.

5

u/[deleted] Sep 25 '21

Time is just awful.

0

u/[deleted] Sep 25 '21

[deleted]

18

u/RadiantDevelopment1 Sep 25 '21

Same example works is you store epoch time or UTC time. UTC and epoch are great for recording exactly when something happened but you need extra timezone and locale data for context (did this happen at noon, midnight or dawn?).

That context is especially important when predicting or scheduling future events.

0

u/[deleted] Sep 26 '21

[deleted]

3

u/RadiantDevelopment1 Sep 26 '21

Nobody does X is a great design principle all programmers should follow!

1

u/Cyral Sep 26 '21

And how is the client going to convert it when it’s system time zone of Europe/Oslo no longer exists because this guy doesn’t care about backwards comparability?

-7

u/[deleted] Sep 25 '21

[removed] — view removed comment

45

u/MrJohz Sep 25 '21

The timezone database is that standard and protocol. It's a database rather than a server protocol because it turns out it's often useful to know timezone information without an internet connection (the products that I work on would not work in that situation, for example), but it's essentially what you're describing.

-4

u/[deleted] Sep 25 '21

[removed] — view removed comment

21

u/MrJohz Sep 25 '21

The difference is that it's usually okay to have a copy of the timezone DB that's a couple of months out of date. In a lot of cases, it's probably okay if your copy is a few years of of date in large portions of the world. So you don't have the same urgent need for something live and up-to-date that you do with NTP.

6

u/[deleted] Sep 25 '21

Updating embedded systems is a separate problem with its own unique challenges.

5

u/Fenris_uy Sep 25 '21

Most system do update their timezones be from a central DB.

3

u/figurativelybutts Sep 25 '21

You mean TZDIST? I know of no implementations of it out in the wild. Vendors have largely decided to bundle tzdist on their own instead.