|
Posted by sisyphus on September 16, 2008, 11:38 pm
Please log in for more thread options
.
.
> The line in Date::Manip that is failing is
>
> =A0 =A0my($tz)=3D$Cnf;
> =A0 =A0$tz=3D$Cnf =A0if (! $tz);
> =A0 =A0$tz=3D$Zone =A0if ($tz !~ /^[+-]\d$/);
>
> =A0 =A0my($tzs)=3D1;
> =A0 =A0$tzs=3D-1 if ($tz<0); ### ERROR OCCURS HERE
It's just a warning - not an error in itself. But if it's leading to
incorrect results, then there's probably something not right :-)
>
> So Date::Manip is assuming that $Cnf has been initialized with elements "=
ConvTZ"
> or "TZ".
I think $tz must be *initialized* by the time
$tz=3D$Zone if ($tz !~ /^[+-]\d$/);
gets run. If it were not initialized at that stage you'd get a warning
along the lines of "Use of uninitialized value $tz in pattern match
(m//) at Manip.pm line 3324. That being so, it must be the '$tz =3D
$Zone' that's assigning undef to $tz - since there's
no other way that an initialized $tz could become uninitialized (that
I can think of, anyway).
Probably wouldn't hurt to hack in some print() statements just to see
what $tz contains at various stages - and also to check what
$Zone contains. I don't know much about Date::Manip,
but my hunch is that it's the contents of $Zone that's
causing the problem.
Cheers,
Rob
|