[Python-Dev] datetime +/- scalars (int, long, float)?

Tim Peters tim.one@comcast.net
Mon, 04 Mar 2002 22:43:03 -0500


[Kevin Jacobs]
>> ..
>> The concept of a "day" can be somewhat ambiguous.  I've seen
>> datetime implementations that will apply DST changes when asked to
>> adjust by days, but not when asked to adjust by seconds, hours or
>> minutes.

[Guido]
> Yes.  A "day" is always 24 hours.

In real life, if it's 3pm on the day before DST begins or ends, and I count
off 24 hours, "one one thousand, two one thousand, three one thousand, ...
eighty six thousand four hundred one thousand", I'm going to look up and see
2pm or 4pm on my high-tech auto-adjusting clocks.  If I add 24 hours to my
datetime object, though, I'm going to see 3pm.

The only conclusion I have at this time is that I like datetime objects
better than real life <wink>.