Bug 1313677 - timelocal() thinks the year 2100 is a leap year
timelocal() thinks the year 2100 is a leap year
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: perl (Show other bugs)
5.11
x86_64 Linux
unspecified Severity low
: rc
: ---
Assigned To: perl-maint-list
BaseOS QE - Apps
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-02 03:09 EST by Karsten Weiss
Modified: 2017-04-18 17:56 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-04-18 17:56:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Upstream fix ported to perl-5.8.8 (4.32 KB, patch)
2016-03-09 10:00 EST, Petr Pisar
no flags Details | Diff

  None (edit)
Description Karsten Weiss 2016-03-02 03:09:37 EST
Description of problem:

perl's timelocal() thinks the year 2100 is a leap year but it is not.

2100 is divisible by 100 but not by 400.

Version-Release number of selected component (if applicable):

perl-5.8.8-43.el5_11

How reproducible:


Steps to Reproduce:
1. /usr/bin/perl -e 'use Time::Local; printf("%s\n", timelocal(0, 10, 10, 29, 2-1, 2100));'
2.
3.

Actual results:

"4107575400"

Expected results:

"Day '29' out of range 1..28 at -e line 1."

Additional info:

RHEL 6.7 and 7.2 are fine.
Comment 1 Petr Pisar 2016-03-02 04:37:40 EST
Thank you for the report. If this issue is serious for you, please contact Red Hat support. Only this way it gets proper attention from management approving fixes for so old piece of software as RHEL 5 is.
Comment 2 Petr Pisar 2016-03-09 08:38:06 EST
This was fixed in upstream with commits:

commit 447c14e7f0e515ee6cffca2bfbae6b3939302c68
Author: Dave Rolsky <autarch@urth.org>
Date:   Sun Jan 21 16:15:37 2007 +0000

    Fix leap year calculations in Time::Local so they work outside of
    32-bit epoch range.

commit e6b6ec4dfc86ff6c5e56706950e81a18059b68e5
Author: Dave Rolsky <autarch@urth.org>
Date:   Wed Jan 24 02:59:56 2007 +0000

    Fix major leap-year brokenness.

and a minor fix for tests on platforms with unsigned epoch value:

commit d9722d455d5b8d5aa524df3358ba5ccc2ed3d424
Author: Dave Rolsky <autarch@urth.org>
Date:   Mon Jan 22 15:42:55 2007 +0000

    Fix test count on platforms that don't support negative epochs.

commit bb5afc9de848f95125a7786d0f9e6183cff99041
Author: Dave Rolsky <autarch@urth.org>
Date:   Thu Jan 25 19:20:49 2007 +0000

    Fix the test count for Win32 and other annoying platforms.
Comment 3 Petr Pisar 2016-03-09 10:00 EST
Created attachment 1134556 [details]
Upstream fix ported to perl-5.8.8
Comment 4 Chris Williams 2017-04-18 17:56:22 EDT
Red Hat Enterprise Linux 5 shipped it's last minor release, 5.11, on September 14th, 2014. On March 31st, 2017 RHEL 5 exited Production Phase 3 and entered Extended Life Phase. For RHEL releases in the Extended Life Phase, Red Hat  will provide limited ongoing technical support. No bug fixes, security fixes, hardware enablement or root-cause analysis will be available during this phase, and support will be provided on existing installations only.  If the customer purchases the Extended Life-cycle Support (ELS), certain critical-impact security fixes and selected urgent priority bug fixes for the last minor release will be provided.  For more details please consult the Red Hat Enterprise Linux Life Cycle Page:
https://access.redhat.com/support/policy/updates/errata

This BZ does not appear to meet ELS criteria so is being closed WONTFIX. If this BZ is critical for your environment and you have an Extended Life-cycle Support Add-on entitlement, please open a case in the Red Hat Customer Portal, https://access.redhat.com ,provide a thorough business justification and ask that the BZ be re-opened for consideration of an errata. Please note, only certain critical-impact security fixes and selected urgent priority bug fixes for the last minor release can be considered.

Note You need to log in before you can comment on or make changes to this bug.