Comment 3 for bug 347303

Revision history for this message
Steve Peters (steve-fisharerojo) wrote : Re: [Bug 347303] [NEW] ENV{TZ} and strftime in perl not working

On Wed, Mar 25, 2009 at 4:13 PM, Launchpad Bug Tracker
<email address hidden> wrote:
> You have been subscribed to a public bug:
>
> If you run the following:
>
> perl -e 'use POSIX;
> $ENV{TZ} = "UTC";
> my $time = strftime("%Y-%m-%d %H:%M:%S %Z", localtime(time));
> print "$time\n";
> $ENV{TZ} = "US/Eastern";
> my $time = strftime("%Y-%m-%d %H:%M:%S %Z", localtime(time));
> print "$time\n";'
>
> You should get two different times.
>
> 2009-03-23 14:15:13 UTC
> 2009-03-23 10:15:13 EDT
>
>  But in Ubuntu 8.04 server (lsb_release -rd =>Description:      Ubuntu
> 8.04.2, Release: 8.04) you instead get
>
> 2009-03-23 14:15:40 UTC
> 2009-03-23 14:15:40 EDT
>
> It does the same thing for almost any timezone you give it. It give UTC
> time but labels it as the proper time zone.
>
> This happens on my 8.04 desktop version as well, but not on any 8.10
> machines.
>
> ** Affects: perl (Ubuntu)
>     Importance: Undecided
>         Status: New
>
> --
> ENV{TZ} and strftime in perl not working
> https://bugs.edge.launchpad.net/bugs/347303
> You received this bug notification because you are subscribed to perl in ubuntu.
>

I can confirm that the Perl distributed with Ubuntu 8.04 has problems.
 This problem, however, appears to be a bug in the Debian/Ubuntu perl.
 I just built the original Perl 5.8.8 and everything worked fine.
This problem is caused by some Debian/Ubuntu applied patch.

Steve Peters
<email address hidden>