ctl has asked for the wisdom of the Perl Monks concerning the following question:
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).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: UTC offset
by ikegami (Patriarch) on Jun 09, 2005 at 01:09 UTC | |
|
Re: UTC offset
by mugwumpjism (Hermit) on Jun 09, 2005 at 01:23 UTC |