Update: I was being an idiot and was actually getting -05:00 instead of -04:00. Anyhow, the solution is to do
@g=gmtime;$g[8]=-1;$offset=POSIX::mktime(localtime)-POSIX::mktime(@g);
Since gmtime won't set DST, and when you're in it, that will mess you up (since mktime() takes local time, which in a DST timezone, expects to be in DST).
In reply to UTC offset by ctl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |