Ya, I know I should stay away from Date::Manip, but there's this legacy
code, see...


So, this looks like a result of a timezone change (setting it twice,
in this case):

    $ perl -MDateTime::Format::DateManip -le \
        'print DateTime::Format::DateManip->parse_datetime( "2006-03-11" )'

    2006-03-10T23:00:00


In DateTime::Format::DateManip::parse_datetime():

The code gets the timezone from Date::Manip and creates a DateTime
object with it:


    my ($dm_tz, @bits) = UnixDate($dm_date, qw( %Z %Y %m %d %H %M %S %z ));

    my @args = merge_lists([qw( year month day hour minute second time_zone )],
             \...@bits);

     my $dt = DateTime->new(@args);


In my case I end up with an "OffsetOnly" timezone (-0700).


And then goes on to to figure out the time zone again from a lookup
table:

    my $dt_tz = $class->get_dt_timezone($dm_tz);

    if (defined $dt_tz) {
        $dt->set_time_zone($dt_tz);


In my case I now have 'US/Pacific'.


If setting the timezone like this shouldn't it be a floating time
initially?







-- 
Bill Moseley
mose...@hank.org
Sent from my iMutt

Reply via email to