On 31/1/03 12:19 pm, Dave Rolsky at [EMAIL PROTECTED] spake thus:
> What should happen when someone does this:
>
> my $dt = ...;
>
> $dt->set( time_zone => 'America/Denver' );
>
> and the new time zone is different from the old?
>
> There's two ways to do this. One is to keep the UTC time the same, which
> ends up shifting the effective local time.
>
> The other would be to change the local time (in effect shifting the UTC
> time).
My thoughts:
If a timezone is presented with a time, then the time is taken to be in that
timezone. If a timezone is presented without a time (where a time already
exists) then the output is all that changes. The internal time doesn't
change.
Maybe think about:
$dt->move_time_zone('America/Denver' );
I just feel that there is very little use for inputting a time at +11, and
then wanting to pretend that it is -6. Of course you might want to do that
when you *create* the time: (however the new format is)
$dt = new DateTime(gregorian_iso=>'2003-01-31 14:42:12-1100'
gregorian_timezone=>'-0600')
Which would set the internal time to 3:42am and the internal timezone to
+0600, and would output 9:42pm on the 30th Jan.
Anyways, that's my thoughts.
Cheers!
Rick
--------------------------------------------------------
�� � � � � � There are 10 kinds of people:
�� those that understand binary, and those that don't.
--------------------------------------------------------
�� The day Microsoft makes something that doesn't suck
�� � is the day they start selling vacuum cleaners
--------------------------------------------------------