http://www.perlmonks.org?node_id=1033549


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 ); }