This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients
Date 2006-05-12.16:15:47
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=31435

Since the lack of arithmetic on `time` objects is both
intended and documented, this isn't "a bug".  I moved this
to the Feature Requests tracker.

The problem with arithmetic on time objects is that it's not
obvious what to do in case of overflow or underflow:  wrap
around or raise OverflowError?  Either way violates _some_
reasonable expectation.  Embed your time in a `datetime`
object and then you can decide what you want to do.  For
example, if you want to wrap around,

>>> print (datetime.combine(date.today(), time(hour=0)) -
timedelta(hours=1)).time()
23:00:00
History
Date User Action Args
2007-08-23 16:11:55adminlinkissue1487389 messages
2007-08-23 16:11:55admincreate