This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Chris.Bergstresser
Recipients Chris.Bergstresser, belopolsky, r.david.murray
Date 2012-05-09.23:44:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1336607073.97.0.662303766617.issue14766@psf.upfronthosting.co.za>
In-reply-to
Content
It doesn't seem to be a bug in pytz.  AFAICT, the only methods that get called during the time comparison is "utcoffset" on the UTC timezone, and "utcoffset" on the New York timezone.

Looking closer at it, it seems that Python is calling d1.tzinfo.utcoffset(None), rather than d1.tzinfo.utcoffset(d1).  This is a problem, because the New York timezone cannot calculate the utcoffset without knowing what date it's calculating.  As a result, it returns None rather than potentially guessing wrong.
History
Date User Action Args
2012-05-09 23:44:33Chris.Bergstressersetrecipients: + Chris.Bergstresser, belopolsky, r.david.murray
2012-05-09 23:44:33Chris.Bergstressersetmessageid: <1336607073.97.0.662303766617.issue14766@psf.upfronthosting.co.za>
2012-05-09 23:44:33Chris.Bergstresserlinkissue14766 messages
2012-05-09 23:44:33Chris.Bergstressercreate