Chris Bergstresser <ch...@subtlety.com> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14766>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to