[New-bugs-announce] [issue31167] timedelta produced by datetime.__sub__ does not take Daylight Savings Time into account
report at bugs.python.org
Wed Aug 9 22:04:40 EDT 2017
New submission from Joshua Li:
See my SO answer and the corresponding question for detail: https://stackoverflow.com/a/45602760/5348393
Essentially, given two datetime.datetime instances t1 and t2, the following two syntactically different lines of code should be logically equivalent, but in fact differ by plus or minus one hour on Daylight Savings Time dates because `datetime.datetime.__sub__` does not appear to take DST into account.
I am not sure if this is by intentional design, or a behavioral bug.
components: Library (Lib)
title: timedelta produced by datetime.__sub__ does not take Daylight Savings Time into account
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce