[issue3893] timedelta overflows in a surprising way

2008-09-18 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- resolution: -> invalid status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3893] timedelta overflows in a surprising way

2008-09-18 Thread Shannon -jj Behrens
Shannon -jj Behrens <[EMAIL PROTECTED]> added the comment: Yes, that makes perfect sense. Sorry, I missed that part of the docs. Please feel free to close this bug. ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3893] timedelta overflows in a surprising way

2008-09-17 Thread Tim Peters
Tim Peters <[EMAIL PROTECTED]> added the comment: Not a bug. Try (future - now).seconds instead so that the timedelta is positive. As explained in the docs, a negative timedelta is normalized so that only the .days attribute is negative, and, as the docs also say, "normalization of negative val

[issue3893] timedelta overflows in a surprising way

2008-09-17 Thread Shannon -jj Behrens
New submission from Shannon -jj Behrens <[EMAIL PROTECTED]>: 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