Alexander Belopolsky added the comment:

I think the timezone related problems are a red herring.  Aware datetime +/- 
timedelta arithmetics is naive - tzinfo is ignored in calculations and copied 
to the result:

http://hg.python.org/cpython/file/c83ce2a1841c/Lib/datetime.py#l1711

The utcoffset only will only come into play if we want to implement time - time 
-> timedelta, but this problem is already there in time comparisons:

http://hg.python.org/cpython/file/c83ce2a1841c/Lib/datetime.py#l1091

It is up to tzinfo subclass implementation writers to handle inability to 
compute utcoffset without date fields by raising an exception if necessary.  It 
is perfectly fine for time - time to fail with an error coming from 
.utcoffset().

I also don't think the fate of #13936 has any bearing on this issue.  As long 
as we are not trying to implement time + time -> time, we are not introducing 
any new notion of "zero time".

----------

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

Reply via email to