Discrepancy with zoneinfo

Bug #1881728 reported by _Alex_
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pytz
Invalid
Undecided
Unassigned

Bug Description

I found a discrepancy between `pytz` and `zoneinfo` running a test suite on one of my projects after migrating from `pytz` to `zoneinfo`. This test case was built using values described [in this blog post](https://kite.com/python/docs/pytz.tzfile.DstTzInfo.normalize), to test that I properly used `normalize` at some point.

```python
>>> t = 2002, 10, 27, 1, 0
>>> z = 'America/New_York'
>>> pytz.timezone(z).localize(datetime(*t)) - datetime(*t, tzinfo=ZoneInfo(z))
datetime.timedelta(seconds=3600) # I would have expected timedelta(0)
```

Edit: this was tested with `backports.zoneinfo==0.2.0` and `pytz==2020.1` on CPython 3.7.5.

Revision history for this message
_Alex_ (alexgtk19) wrote :

After a detailed explanation from zoneinfo maintainer here https://github.com/pganssle/zoneinfo/issues/79.
This is an expected behavior due to PEP 495.

Changed in pytz:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.