Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Strage result using localtime to convert epoch time

by revdiablo (Prior)
on Jul 20, 2007 at 21:29 UTC ( #627889=note: print w/ replies, xml ) Need Help??


in reply to Strage result using localtime to convert epoch time

I cannot duplicate your output. Is there more to the code you're not showing us? When I run it, I see the following:

$ perl 627886.pl <br>mtime = 1178489994 <br>54, 19, 15, 6, 4, 107, 0, 125, 1

Update: ah, I can indeed reproduce your output if I add use Time::localtime; to the code. Now I get:

$ perl 627886.pl <br>mtime = 1178489994 <br>Time::tm=ARRAY(0x81cce18), , , , , , , ,

I missed the Time::tm= bit the first time I saw your code. This module is overriding the localtime function and returning an object instead of the usual return values.


Comment on Re: Strage result using localtime to convert epoch time
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://627889]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2015-07-06 16:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls