wrong utcoffset for aware datetimes
Bug #1485808 reported by
Alex Becker
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pytz |
New
|
Undecided
|
Unassigned |
Bug Description
Calling utcoffset on a timezone using an aware datetime returns a different result than for a naive timezone. This makes datetime's isoformat() function return incorrect results.
import datetime
from pytz import timezone
tz = timezone(
naive = datetime.
aware = naive.replace(
assert(
The assertion fails. Note that this happens with every datetime/timezone combination I've tried, not just US/Pacific and 2000-06-01.
To post a comment you must log in.