Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by Not_a_Number (Prior)
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?
[Corion]: Meh. I have a very simple mechanism to scrape+track prices, and even to send me mail if something changes (via cron), but SQLite doesn't support window functions, so my simple SQL to determine a price change won't work :-( Maybe I should store the DB ...
[Corion]: ... in Pg, but that would mean that I'd have to deal with credentials and stuff :)

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2018-02-23 15:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (302 votes). Check out past polls.

    Notices?