Falsehoods programmers believe about time and time zones
11–20 of 83 posts
Re: Falsehoods programmers believe about time and time zones
#12Re: Falsehoods programmers believe about time and time zones
#13Re: Falsehoods programmers believe about time and time zones
#14I would add most programmers don't know some time zones have offsets in minutes. In ancient times, some were in seconds. I live in UTC-04:30 and regularly encounter bugs because of it.
eg daylight savings is UTC+13:00 here.
Re: Falsehoods programmers believe about time and time zones
#15"The special area of "Etc" is used for some administrative zones, particularly for "Etc/UTC" which represents Coordinated Universal Time. In order to conform with the POSIX style, those zone names beginning with "Etc/GMT" have their sign reversed from the standard ISO 8601 convention. In the "Etc" area, zones west of GMT have a positive sign and those east have a negative sign in their name (e.g "Etc/GMT-14" is 14 hours ahead/east of GMT.)"
[0] https://github.com/bitwalker/timex [1] https://en.wikipedia.org/wiki/Tz_database#Area
Re: Falsehoods programmers believe about time and time zones
#16My 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.
I've encountered English people who made a fuss about the loss of "God's Magnificent Time", but for better or worse GMT is no longer the official name.
Re: Falsehoods programmers believe about time and time zones
#17Wrong, Russia has combined some timezones into a single one and then has split it back a few years later.
Re: Falsehoods programmers believe about time and time zones
#18Dealing 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
1.3MB and it's actually raw code. Amazing.
Re: Falsehoods programmers believe about time and time zones
#19Re: Falsehoods programmers believe about time and time zones
#20What surprised me the most recently was that POSIX specifies timezone offsets the other way round from the rest of the world, and thus many parsing libraries will interpret something like "2016-1-1 12:00:00 GMT+2" as 14:00 in UTC, instead of 10:00.