by hinkley · 4y ago · 0 comments
I am shocked that none of our unit tests failed on Monday. One of the first code reviews I did here I pointed out that his tests were going to break in a few months when DST kicked in because his tests asserted that there was a 24 hour gap between two calculations. He responded this code was temporary and it would be gone by then.
There was another PR on a certain Monday a few months later. Told ya so.
I think it just means for all American developers it's _more_ likely they'll introduce bugs if they cater to an international audience and there's still countries with DST.
DST has always been a good way to get Devs to think about the timezone database. If people start relying on offsets more that's not a net good thing, until the entire world is done with DST.
There is no end to time zone related oddities, including the way DST and standard time switching happen in the U.S./Canada vs. how it happens in Europe.
You should know in how many frameworks and libraries i18n is an afterthought and much more cumbersome than necessary.
To be fair, I snoozed through sentence structure in English class. It wasn't until I was trying to conjugate verbs in another language that it became concrete for me and I had to understand it.
If you have a DSL that retains order of the arguments, you're gonna have a bad time. Full Yoda mode engaged. If you have one that allows named interpolation, you'll sound less dumb. If you have one that allows conjugation, better yet. But at the end of the day there are languages that use different adjectives or number systems[1] based on the object or direct object of a sentence, and so you might not be able to substitute "apples" "people" and "files" interchangeably into the same template, even if you can do things like differentiate "There is 1 file in this directory." from "There are 3 files in this directory." without having to build a Cartesian product of all combinations.
1) In Japanese there are different words for counting different things, but Arabic numerals are acceptable, so you can leave it to the reader to determine which word to use. I don't know that this is true in all other languages with discrete counting systems.
GMT is great for client/server interactions. But users have a habit of wanting things to happen at "8 am on Saturday" and GMT is lousy for things like that.
In this situation, when the user enters "8 am on Saturday", they would do so in their local time, it would be converted to GMT before inserting, and again back into local time when that record is viewed in the UI.
Moving DST is my pettiest reason for disliking George W Bush. Flashbacks to the last few times I had to fix time offsets for some country or state that opted out.
So your code will still require this logic, it just may be easier to ignore the bugs of a while.
There is nothing to thank for since nothing will change, except for the lack of enforced switches the developers will have to deal with, which may lead to more bugs.