[Bug 1372923] New: Package modified in Fedora exhibits bad behavior when / etc/localtime is old

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1372923

            Bug ID: 1372923
           Summary: Package modified in Fedora exhibits bad behavior when
                    /etc/localtime is old
           Product: Fedora
           Version: 23
         Component: perl-DateTime-TimeZone
          Assignee: jplesnik@xxxxxxxxxx
          Reporter: don@xxxxxxxxxx
        QA Contact: extras-qa@xxxxxxxxxxxxxxxxx
                CC: iarnell@xxxxxxxxx, jplesnik@xxxxxxxxxx,
                    perl-devel@xxxxxxxxxxxxxxxxxxxxxxx



Description of problem:
I was on FC20 at some point, and upgraded to FC23.  I hadn't noticed until now
that my /etc/localtime was a copy and not a symlink of the Los_Angeles zoneinfo
file.  So this means my /etc/localtime file is from FC20, even though I'm on
FC23.  This causes problems with DateTime::TimeZone package.  I have this test
perl program:

#!/usr/bin/perl
use DateTime::TimeZone;
print "DateTime::TimeZone::VERSION=" . $DateTime::TimeZone::VERSION . "\n";
my $ltz = DateTime::TimeZone->new(name => 'local');
print "\n$ltz\n";
print "tz offset=" . $ltz->offset_as_string(-25200) . "\n";

On my system, this program generates the following output:

[root@pp10 ~]# perl test.pl
DateTime::TimeZone::VERSION=2.01

DateTime::TimeZone::Tzfile=HASH(0x1222668)
Can't locate object method "offset_as_string" via package
"DateTime::TimeZone::Tzfile" at test.pl line 26.
[root@pp10 ~]#

Note that DateTime::TimeZone->new(name => 'local') returned a
DateTime::TimeZone::Tzfile object.  I contacted the maintainer of
DateTime::TimeZone, and he assured me this is impossible.  He said this package
was modified, and it turns out he's right.  The package from CPAN gives the
expected result (proper error message) with the FC20 localtime file.  With a
FC23 localtime file, it also works fine (I get Los_Angeles object with offset
-0700 reported by the program).  I don't know why this package is modified
under the Fedora project.  I debugged, and found the problem to be in the
/usr/share/perl5/vendor_perl/DateTime/TimeZone/Local/Unix.pm file.  Unix.pm has
code not found in the CPAN version, so it is from the Fedora project.


Version-Release number of selected component (if applicable):
perl-DateTime-TimeZone-2.01-1.fc23.noarch

How reproducible:


Steps to Reproduce:
1. Copy /etc/localtime from an FC20 system to an FC23 system.
2. Run the above test perl program.


Actual results:
DateTime::TimeZone::Tzfile=HASH(0x1222668)
Can't locate object method "offset_as_string" via package
"DateTime::TimeZone::Tzfile" at test.pl line 26.

Expected results:
Cannot determine local time zone

Additional info:
The package from CPAN gives the expected result (proper error message) with the
FC20 localtime file.  With a FC23 localtime file, it also works fine (I get
Los_Angeles object with offset -0700 reported by the program).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://lists.fedoraproject.org/admin/lists/perl-devel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]

  Powered by Linux