Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 ); }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1033549]
help
Chatterbox?
[chacham]: right now im editing the versions in the applications gradle file to use a version it wants. sheesh.
[Corion]: Ow, "but you're not supposed to do that" ;)
[chacham]: with google, you kinda just gotta do what it recomends.

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2017-03-29 08:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (344 votes). Check out past polls.