The timezone functions are not working properly for non-standard timezones behind UTC that have either:
zero hours but non-zero minutes (e.g. -00:30)
minutes that aren't 0 or 30 (e.g. -02:15)
Steps to reproduce
(Note: the TZ env var +/- convention is backwards, so that Eastern Standard Time is written TZ=EST+05:00 instead of UTC-05:00)
$ TZ=XXX+02:15 python
>>> from metomi.isodatetime import timezone
>>> timezone.get_local_time_zone()
(-2, 45) # should be (-2, 15) or (-2, -15)
>>> timezone.get_local_time_zone_format()
'-0245' # should be '-0215'
$ TZ=XXX+00:30 python
>>> from metomi.isodatetime import timezone
>>> timezone.get_local_time_zone()
(0, 30) # should be (0, -30)
>>> timezone.get_local_time_zone_format()
'+0030' # should be '-0030'
The timezone functions are not working properly for non-standard timezones behind UTC that have either:
Steps to reproduce
(Note: the
TZ
env var +/- convention is backwards, so that Eastern Standard Time is writtenTZ=EST+05:00
instead of UTC-05:00)Additional context
If the timezone is east of UTC, it works ok