Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: why are timegm and timelocal returning the same epoch seconds values

by Not_a_Number (Parson)
on May 14, 2013 at 20:37 UTC ( #1033549=note: print w/ replies, xml ) Need Help??


in reply to why are timegm and timelocal returning the same epoch seconds values

Works for me too (with the addition of use Time::Local; at the top).

However, I would simply the sub somewhat:

sub getGMDelta { my @now = localtime; return timegm( @now ) - timelocal( @now ); }


Comment on Re: why are timegm and timelocal returning the same epoch seconds values
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2014-12-20 01:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls