FYI, because of the way python has incorrectly handled timezomes in the past, the python3-icu tests fail, at least when run in a timezone that is -0700 for releases like bionic and older. For example, taking the very similar testcase for the prior 2022c update in LP: #1986984, on ubuntu 18.04 it results:
FYI, because of the way python has incorrectly handled timezomes in the past, the python3-icu tests fail, at least when run in a timezone that is -0700 for releases like bionic and older. For example, taking the very similar testcase for the prior 2022c update in LP: #1986984, on ubuntu 18.04 it results:
ubuntu@ sec-bionic- amd64:~ $ apt policy tzdata | grep Installed:
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Installed: 2022c-0ubuntu0. 18.04.0 sec-bionic- amd64:~ $ python3 TimeZone. createTimeZone( "America/ Santiago" )) tz.utcoffset( always_ before) == tz.utcoffset( now_before) ) tz.utcoffset( now_before) != tz.utcoffset( always_ after)) now_before) timedelta( -1, 75600) always_ after) timedelta( -1, 75600)
ubuntu@
Python 3.6.9 (default, Jun 29 2022, 11:45:57)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> from icu import ICUtzinfo, TimeZone
>>> tz = ICUtzinfo(
>>> always_before = datetime(2022, 9, 1)
>>> now_before = datetime(2022, 9, 8)
>>> always_after = datetime(2022, 9, 12)
>>> assert(
>>> assert(
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AssertionError
>>> tz.utcoffset(
datetime.
>>> tz.utcoffset(
datetime.
For ensuring the ESM releases were handling the changes correctly, I created a python3-tz[1] based script at https:/ /git.launchpad. net/qa- regression- testing/ tree/scripts/ test-tzdata. py and in fact, just pushed an added testcase for this bug that looks like https:/ /git.launchpad. net/qa- regression- testing/ tree/scripts/ test-tzdata. py#n95
Thanks.
[1] The pytz project documents a lot of the issues with timezone handling in older pythons at their project page: https:/ /pytz.sourcefor ge.net/