3 ms·
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 wi
by detaro 11y ago
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.
- x1798DE 11y agoIt'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.
- detaro 11y agoIndeed. 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.
- techdragon 11y agoIts 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.
- voltagex_ 11y agoOh no, GMT+2 means subtract two hours? How does that work?