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 Lakin.Wecker
Recipients Lakin.Wecker
Date 2012-02-03.20:43:16
SpamBayes Score 1.9826318e-06
Marked as misclassified No
Message-id <1328301796.8.0.996607861145.issue13936@psf.upfronthosting.co.za>
In-reply-to
Content
midnight is represented by datetime.time(0,0,0).  However, this time (unlike all other valid times, including datetime.time(0,0,1)) evalutes to false in if conditions:

import datetime
if datetime.time(0,0,0):
    print "datetime.time(0,0,0) is not a bug!"
else:
    print "datetime.time(0,0,0) is a bug!"

if datetime.time(0,0,1):
    print "datetime.time(0,0,1) is not a bug!"
else:
    print "datetime.time(0,0,1) is a bug!"
History
Date User Action Args
2012-02-03 20:43:16Lakin.Weckersetrecipients: + Lakin.Wecker
2012-02-03 20:43:16Lakin.Weckersetmessageid: <1328301796.8.0.996607861145.issue13936@psf.upfronthosting.co.za>
2012-02-03 20:43:16Lakin.Weckerlinkissue13936 messages
2012-02-03 20:43:16Lakin.Weckercreate