Ask HN: Why are GMT{+,-}N timezones sometimes reversed?

2 points by zensavona ↗ HN
So today I encountered a very strange "bug" in some code. I was converting timezones using a time and date library, and they were being converted totally wrong.

I probed a little deeper and discovered that converting to e.g. "GMT+1" from GMT was actually subtracting an hour.

I opened a ticket on the library, and the owner linked me to this: https://en.wikipedia.org/wiki/Tz_database#Area

> " 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.)"

Does anyone know why?

1 comment

[ 4.7 ms ] story [ 17.7 ms ] thread
It's the offset added to the local time to arrive at UTC. So basically just the opposite perspective.

I dream of the day where ISO 8601 is pervasive.