Dave Rolsky schreef:
> There have been several reports, they're in the list archives.  One was 
> from Mike Schilli.  Then another more recent one complained about the 
> change I made based on Mike's bug report.  Can't win ;)

I've found it now: http://www.nntp.perl.org/group/perl.datetime/5619 .

Mike actually complained about a subtraction around a DST change, where
the difference was less than a day:

  2003-04-06T01:58:00 - 2003-04-06T03:01:00 .

This returned 1h 3m, when the two dt's were just 3 minutes apart due to
a DST change. In this case, doing the math on the UTC datetimes gives
the "most reasonable" answer.

This suggests that the proper solution is not to have two methods, one
for local subtraction and one for utc subtraction; but to do
calculations with hours/mins/seconds in utc, and days/months/years in
local time.

> That's true, but it's a bit cumbersome.  At the very least, offering some 
> sort of convenience method for the above would be nice.

If it's needed. Which for Mike's problem, it isn't.

> Actually, DateTime was doing some really weird stuff for a long time, 
> mixing local and UTC times in the date math.

As I said, mixing local and utc math would be "correct", IMHO, although
I'm not certain the previous implementation was the correct one.

Eugene

Reply via email to