in reply to Re: Finding a remote time
in thread Finding a remote time
Actually you might want to use:
use POSIX qw( tzset ) sub localtime_in { local $ENV{TZ} = shift; tzset; localtime } $localtime_in_EST = localtime_in( "EST" );
Otherwise you've globally change the timezone for any other calls to (gm|local)time elsewhere in your code.
And personally I've used both some variant of twiddling $ENV{TZ} like this and DateTime.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Finding a remote time
by gellyfish (Monsignor) on Jul 17, 2006 at 14:26 UTC | |
|
Re^3: Finding a remote time
by Jenda (Abbot) on Jul 17, 2006 at 15:58 UTC | |
by Fletch (Bishop) on Jul 17, 2006 at 16:18 UTC |