[Python-ideas] Please reconsider the Boolean evaluation of midnight
Chris Angelico
rosuav at gmail.com
Thu Mar 6 23:52:28 CET 2014
On Fri, Mar 7, 2014 at 9:38 AM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> It seems you're thinking of it as a mod-24-hour timedelta.
> Given that, I can see why you think that it's bizarre
> to attach a timezone to one. In fact, I'd say if that's
> really how a time object is meant to be interpreted,
> they shouldn't even be *allowed* to have a timezone,
> any more than a timedelta can.
Which is the earlier time: 18:00:00 Australia/Melbourne, or 03:00:00
America/New_York? If you add a date to it, you could get an aware
datetime that represents an exact instant, and compare them. Can you
compare them, as they are? Is it reliable?
This is nothing to do with timedelta versus datetime. It's to do with
attaching timezone information to a dateless time.
ChrisA
More information about the Python-ideas
mailing list