The following works:

use POSIX;
$ENV{TZ} = "UTC";
#my $time = strftime("%Y-%m-%d %H:%M:%S %Z", localtime(time));
my $time = `date`;
print "$time\n";
$ENV{TZ} = "US/Eastern";
my $time = `date`;
#my $time = strftime("%Y-%m-%d %H:%M:%S %Z", localtime(time));
print "$time\n";

And I ran the code that doesn't work with a source install of
perl-5.10.0 and it worked as well. So it looks like its perls POSIX
library that is installed by Ubuntu.

-- 
ENV{TZ} and strftime in perl not working
https://bugs.launchpad.net/bugs/347303
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to