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 ronaldoussoren
Recipients ronaldoussoren
Date 2013-02-21.12:47:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1361450879.34.0.390010426075.issue17267@psf.upfronthosting.co.za>
In-reply-to
Content
It would be nice if datetime.time would be possible to add a delta to a datetime.time object, and if datetime.time had a method for returning the current time (just like datetime.date and date time.datetime have 'today' and 'now' methods).

Rationale for the '+' operator: calculating the wall clock time some time after an time on an unspecified date. The easy solution would be:

   tm = datetime.time(13, 20)
   later = tm + datetime.timedelta(hours=5, minutes=44)

That's is currently not possible, but requires more complicated code.

Getting the current time without date information currently requires getting done with 'datetime.datetime.now().time()', a class method of 'datetime.time' would IMHO be nicer. I must admit that I don't have a good suggestion for the name of that method.
History
Date User Action Args
2013-02-21 12:47:59ronaldoussorensetrecipients: + ronaldoussoren
2013-02-21 12:47:59ronaldoussorensetmessageid: <1361450879.34.0.390010426075.issue17267@psf.upfronthosting.co.za>
2013-02-21 12:47:59ronaldoussorenlinkissue17267 messages
2013-02-21 12:47:58ronaldoussorencreate