timezone comparison bug
Bug #1853347 reported by
Ignacio Mackenney
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pytz |
New
|
Undecided
|
Unassigned |
Bug Description
Hi! a timezone constructed by pytz does not compare equal to the timezone obtained from a datetime localized by the timezone first mentioned.
An example:
(executed 2019-11-20 15:21:00)
---
from datetime import datetime
import pytz
tzcl = pytz.timezone(
now = datetime.now()
now = tzcl.localize(now)
print(now.tzinfo == tzcl)
# False, expected True
print(tzcl.
# <DstTzInfo 'America/Santiago' LMT-1 day, 19:17:00 STD>
print(now.
# <DstTzInfo 'America/Santiago' -03-1 day, 21:00:00 DST>"
description: | updated |
To post a comment you must log in.