smackdab has asked for the wisdom of the Perl Monks concerning the following question:
This takes the diff between GMT and my localtime. I can check if 'isdst' is set (from localtime) and then subtract an hour. This works in North America...but probably won't elseware... ;-)The relevant snipit: my $offset = sprintf "%.1f", (timegm(localtime) - time) / 3600; my $minutes = sprintf "%02d", ( $offset - int($offset) ) * 60; $TZ = sprintf("%+03d", int($offset)) . $minutes;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: net::smtp and date field
by PodMaster (Abbot) on Jul 23, 2002 at 09:46 UTC |