[rt-users] Weird hardcore scrip question regarding POSIX, strftime(), localtime()

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Mon Jan 30 22:02:52 EST 2006


On Jan 30, 2006, at 9:57 , Rick Russell wrote:

> My epoch seconds are good, but the output of localtime($MySeconds)  
> seems to
> vary, even when supplied with the same input data. Sometimes posting
> localtime($MySeconds) to the error log results in a string posted  
> to the
> error log, like
>
> Thu Jan 19 08:00:00 2006
>
> Other times, it results in an ARRAY:
>
> Time::tm=ARRAY(0xde1a0f0)

Something is using Time::localtime, but not consistently.  You can  
work around it by calling CORE::localtime which always gets the Perl  
built-in.

-- 
brandon s. allbery     [linux,solaris,freebsd,perl]       
allbery at kf8nh.com
system administrator  [openafs,heimdal,too many hats]   
allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university       
KF8NH






More information about the rt-users mailing list