#!/usr/bin/perl
use strict;
my $time = time();
print "Localtime is [".localtime($time)."[ when \$ENV{TZ} is [$ENV{TZ}] based on time [$time]\n";
$ENV{TZ} = 'GMT';
print "Localtime is now [".localtime($time)."] when \$ENV{TZ} is [$ENV{TZ}[ based on time [$time]\n";
####
Localtime is [Wed May 29 14:42:15 2002] when $ENV{TZ} is [] based on time [1022704935]
Localtime is now [Wed May 29 20:42:15 2002] when $ENV{TZ} is [GMT] based on time [1022704935]
####
#!/usr/bin/perl
use strict;
use Date::Manip;
print &UnixDate(&ParseDate("epoch ".time()),"%Y-%m-%d %H:%M:%S")."\n";
####
[starky@freak bin]$ unset TZ
[starky@freak bin]$ ./dm-test.pl
2002-05-29 15:11:01
[starky@freak bin]$ export TZ=GMT
[starky@freak bin]$ ./dm-test.pl
2002-05-29 21:11:15