[New-bugs-announce] [issue3893] timedelta overflows in a surprising way

Shannon -jj Behrens report at bugs.python.org
Thu Sep 18 04:02:45 CEST 2008


New submission from Shannon -jj Behrens <jjinux at users.sourceforge.net>:

I was very surprised by the following behavior:

>>> from datetime import datetime
>>> now = datetime.today()
>>> future = datetime.today()
>>> (now - future).seconds
86395

I know that http://docs.python.org/lib/datetime-timedelta.html says
"This is exact, but may overflow", but I was really expecting a negative
number of seconds.

Feel free to close this bug if you disagree.

----------
components: Library (Lib)
messages: 73353
nosy: jjinux
severity: normal
status: open
title: timedelta overflows in a surprising way
type: behavior
versions: Python 2.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3893>
_______________________________________


More information about the New-bugs-announce mailing list