Bump pytz from 2023.3 to 2024.1 (#2254)

* Bump pytz from 2023.3 to 2024.1

Bumps [pytz](https://github.com/stub42/pytz) from 2023.3 to 2024.1.
- [Release notes](https://github.com/stub42/pytz/releases)
- [Commits](https://github.com/stub42/pytz/compare/release_2023.3...release_2024.1)

---
updated-dependencies:
- dependency-name: pytz
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update pytz==2024.1

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>

[skip ci]
This commit is contained in:
dependabot[bot] 2024-03-24 15:22:05 -07:00 committed by GitHub
commit 52819f7da6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 2344 additions and 2026 deletions

View file

@ -24,7 +24,8 @@ def memorized_timedelta(seconds):
_timedelta_cache[seconds] = delta
return delta
_epoch = datetime.utcfromtimestamp(0)
_epoch = datetime(1970, 1, 1, 0, 0) # datetime.utcfromtimestamp(0)
_datetime_cache = {0: _epoch}
@ -33,12 +34,13 @@ def memorized_datetime(seconds):
try:
return _datetime_cache[seconds]
except KeyError:
# NB. We can't just do datetime.utcfromtimestamp(seconds) as this
# fails with negative values under Windows (Bug #90096)
# NB. We can't just do datetime.fromtimestamp(seconds, tz=timezone.utc).replace(tzinfo=None)
# as this fails with negative values under Windows (Bug #90096)
dt = _epoch + timedelta(seconds=seconds)
_datetime_cache[seconds] = dt
return dt
_ttinfo_cache = {}
@ -55,6 +57,7 @@ def memorized_ttinfo(*args):
_ttinfo_cache[args] = ttinfo
return ttinfo
_notime = memorized_timedelta(0)
@ -355,7 +358,7 @@ class DstTzInfo(BaseTzInfo):
is_dst=False) + timedelta(hours=6)
# If we get this far, we have multiple possible timezones - this
# is an ambiguous case occuring during the end-of-DST transition.
# is an ambiguous case occurring during the end-of-DST transition.
# If told to be strict, raise an exception since we have an
# ambiguous case