Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 romping around the Monastery: (24)
As of 2015-07-31 17:14 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 (279 votes), past polls