[Python-ideas] Please reconsider the Boolean evaluation of midnight

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Mar 7 01:04:56 CET 2014


Chris Angelico wrote:
> Which is the earlier time: 18:00:00 Australia/Melbourne, or 03:00:00
> America/New_York?

If you think of times of day as modular, then it doesn't
make sense to ask whether one is earlier than another.

But to clarify my position: It's okay to attach a
timezone to a *time of day*. It's *not* okay to attach
a timezone to a *difference* between times of day.

This is one of the reasons it's imortant to keep the
two concepts clearly separated, as we do for datetimes
and timedeltas. Thinking that time(0, 0, 0) should be
false seems to be a result of conflating the two.

-- 
Greg


More information about the Python-ideas mailing list