On Tue, 11 Mar 2003, Bruce Van Allen wrote:

> This is the same situation as:
>     my $dt = DateTime->new( year => 2003, month => 4, day => 6,
>                          hour => 1, minute => 59, seconds => 59,
>                          time_zone => 'America/Chicago');
>
>     $dt->add( seconds => 1 )
>
> Upon catching that exception, I think I would always do a "carryover"
> operation, so the result in both cases would be 2003-04-06T03:00:00 w/
> DST flag set.

Are you saying you'd do the carryover yourself, or you expect DateTime.pm
to do it?

> The rule for the end of DST, as you mentioned,
>    >"First" wins, where first is defined as "earliest UTC datetime".
> has withstood every test I've thrown at it.
>
> I guess you're assuming that 03:00:00 wouldn't *always* be the expected
> result (at local start of DST)?

No, this had to do with the switch from saving to standard, where here in
the US 1:59 AM (saving) is followed by 1:00 AM (standard).  So the
question was what should be done if the user asks for "1:30 AM" on the day
the switch occurs, and my answer was that the earliest UTC time wins,
which always means saving time, not standard.

But this doesn't cause any exceptions, of course.  The exceptions are
caused when the user does something that tries to produce a wall clock
time that doesn't exist, which can happen at the transition from standard
to saving.


-dave

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

Reply via email to