Re:Falsehoods programmers believe about time and time zones
by detaro on Sunday April 17, 2016 @12:42PM
(#11515154)
What 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.
[ Parent
| on HN ]
Re:Falsehoods programmers believe about time and time zones
by x1798DE on Sunday April 17, 2016 @04:08PM
(#11516083)
It's extra tough to know what to do on that situation if you don't know the provenance of the timestamp, because there are some programs that output timestamps formatted like a POSIX TZ, but with the opposite sign convention.
Re:Falsehoods programmers believe about time and time zones
by detaro on Sunday April 17, 2016 @04:36PM
(#11516188)
Indeed. If you just have a random timestamp, no clue what it is. Another reason why you should generate ISO 8601 timestamps if possible, but they are not so nice for humans reading (or even worse, writing) them.
Re:Falsehoods programmers believe about time and time zones
by techdragon on Sunday April 17, 2016 @07:33PM
(#11516867)
Its a matter of practice, but on the odd occasion, I've wound up accidentally dating a document with a handwritten full ISO 8601 timestamp, usually happens when I have to sign and date something after spending several hours making notes while reading log files.