Based on previous discussions on the list, it seems to be the case that
the DateTime.pm module's current date math behavior is incorrect.

Basically, the current code assumes that one day is equal to twenty-four
hours, which results in unexpected time changes when date math crosses a
DST change.

So fixing this is relatively easy, but it does have one major caveat.  If
I do this:

 my $dt = DateTime->new( year => 2003, month => 4, day => 5,
                         hour => 2, time_zone => 'America/Chicago',

 $dt->add( days => 1 );

then the code will throw an exception, because there is no local 2:00 AM
on 2003-04-06 in the America/Chicago time zone.

Is that acceptable?  I can't think of any good solutions to this, other
than documenting it.


-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/

Reply via email to