Falsehoods programmers believe about time and time zones
21–30 of 83 posts
Re: Falsehoods programmers believe about time and time zones
#22It bothers me that a minute is not always 60 seconds. For leap seconds why did we choose 23:59:60 instead of 24:00:00? If we had went with the latter we also solve the daylight savings time problem. A day would last until 22:59:59 or 24:59:59 depending on the time of year. It seems like a lot of things would be simpler that way. Does anyone have a better understanding of why things ended up this way?
But how does this solve the problem? Sure, 23:59 is now 60 seconds long, but the minute 24:00 is only 1 second long.
Re: Falsehoods programmers believe about time and time zones
#23My bete noir isn't in the list: GMT is only the UK timezone for about half the year. During the Summer, GMT continues to exist, but the UK time is BST.
Re: Falsehoods programmers believe about time and time zones
#24In 2012, I submitted a Python bug about the bad state of ISO 8601 date parsing in Python. It's still open, after four years of arguments.[1] [1] https://bugs.python.org/issue15873
Thankfully, there are third party libraries that do just this (such as iso8601), but its such a silly dependency to need.
Re: Falsehoods programmers believe about time and time zones
#25There is a video by Computerphile ( https://www.youtube.com/watch?v=-5wpm-gesOY ) which in an entertaining way explains time zone problems.
Re: Falsehoods programmers believe about time and time zones
#26One of the more interesting bugs I've created is in an Elixir program using the (great) Timex[0] library. I realised that for a few particular users, timezones were being inverted when converted (e.g. a user in GMT+5 would behave as if they were in GMT-5 and vice versa). After a lot of time spent proving to myself I was not actually going mad, I opened a Github issue and the library author informed me about one of th…
Re: Falsehoods programmers believe about time and time zones
#27PS. and while we re at it why not switch time to base-10? And seriously get rid of the imperial units already.
Re: Falsehoods programmers believe about time and time zones
#28This is why we should ignore time zones as much as possible. UTC is almost OK, except for the shitshow idiocy of leap seconds. There's no reason for all of us to suffer just so astronomers can use civil time.
None of which match up with any Civil Time anywhere on the world, except UTC which does so only periodically for some European countries, and year round in the following countries which resist the idiocy of shifting their clocks around based on the Season: Burkina Faso, Côte d'Ivoire, The Gambia, Ghana, Guinea, Guinea-Bissau, Liberia, Mali, Mauritania, Tomé and Príncipe, Senegal, Leone, Togo, Western Sahara (not technically a country but that's unrelated to the currently customary timezone), Greenland, Iceland, Saint Helena, Ascension Island and Tristan da Cunha
Re: Falsehoods programmers believe about time and time zones
#29Re: Falsehoods programmers believe about time and time zones
#30Dealing with timezones and daylight savings time has consumed hundreds of hours of my development time. This seriously should be a standard service of the operating system, not the programming language library. Just look at all the code to deal with it in D (written by Jonathan Davis): https://github.com/dlang/phobos/blob/master/std/datetime.d
"(Sorry about that, but we can’t show files that are this big right now.)" 1.3MB and it's actually raw code. Amazing.