Bug 1135981
| Summary: | DateTime::TimeZone::Local->TimeZone does not use /etc/locatime content (Cannot determine local time zone) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Petr Pisar <ppisar> | ||||
| Component: | perl-DateTime-TimeZone | Assignee: | Petr Pisar <ppisar> | ||||
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | rawhide | CC: | iarnell, msuchy, perl-devel | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | perl-DateTime-TimeZone-1.74-2.fc22 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-09-02 16:03:16 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1132483, 1135450, 1138185 | ||||||
| Attachments: |
|
||||||
|
Description
Petr Pisar
2014-09-01 11:59:44 UTC
The correct reproducer is: $ perl -MDateTime::TimeZone::Local -e 'DateTime::TimeZone::Local->TimeZone' Does it expect to have copy under /usr/share/zoneinfo? Or /etc/localtime needs to be really symlink? If it is the first case, then it can be easily fixed by requiring tzdata in spec file. perl-DateTime-TimeZone is obsessed with time zone names. What DateTime::TimeZone::Local->TimeZone does is it tries to determine the zone name by many means. If it can figure out the name, it uses it as a key into its own time zone database. Some of the many means are: (1) Reading /etc/localtime symbolic link value (2) If /etc/localtime is not a symbolic link, it finds its copy under /usr/share/zoneinfo whose path name is the zone name. The tzdata presents in the minimal build root by a transitive dependency. The issue probably is the /etc/localtime is copied by mock into the chroot because the chroot is empty. Then tzadata are installed by @build group. Results the /etc/locatime is a plain file and sometimes out-dated. I've already developed a workaround in the perl-DateTime-TimeZone which parses the time zone definition from /etc/localtime content, so the DateTime::TimeZone::Local->TimeZone will return an unnamed timezone. Based on the upstream discussion, I believe the patch will be refused, but there is not other real fix. I just need to verify the patcg does not break anything and it does not create a build cycle. Created attachment 933831 [details]
Fix
This patch allows the DateTime::TimeZone::Local to use /etc/localtime content to return an unnamed time zone defintion if there is no other way hot to get the time zone name.
I will try this patch. |