New submission from killv5 :
When I run the code attached I get the results below. This is not the expected
behavior because I was expecting the GMT-5 timezone instead of GMT+5. When I
tried to use GMT-5 I had the result of GMT+5. Luckily the timezone names still
work ('EST','CST', etc.)
202
Dennis Sweeney added the comment:
I reproduced something similar in 3.9 with standard library modules:
>>> from datetime import datetime
>>> from zoneinfo import ZoneInfo
>>> zone = ZoneInfo(key='Etc/GMT-3')
>>> zone.tzname(datetime(2021, 1, 28))
'+03'
--
nosy: +Dennis Sweeney
__
Mark Dickinson added the comment:
This isn't a Python bug - it's a quirk of the way that the "Etc/***" timezones
are defined. See for example 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 sig