RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1353509 - Support 2016-12-31 leap second
Summary: Support 2016-12-31 leap second
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: perl-DateTime
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: perl-maint-list
QA Contact: Jakub Heger
URL: https://datacenter.iers.org/web/guest...
Whiteboard:
Depends On:
Blocks: 1380363
TreeView+ depends on / blocked
 
Reported: 2016-07-07 10:57 UTC by Petr Pisar
Modified: 2017-09-26 13:22 UTC (History)
5 users (show)

Fixed In Version: perl-DateTime-1.04-6.el7
Doc Type: Bug Fix
Doc Text:
Cause: Computing time duration through 2016-12-31T23:59:60 second. Consequence: The duration won't be accurate. Fix: A leap seconds appended in the end of 2015-06-30 and 2016-12-31 have been added to perl-DateTime leap second database. Result: Time arithmetic using Perl modules DateTime and DateTime::Duration recognize 2016-12-31 leap second correctly.
Clone Of:
: 1354447 (view as bug list)
Environment:
Last Closed: 2017-08-01 18:14:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
First part: Add 2015-06-30 leap second (1.69 KB, patch)
2016-07-07 12:02 UTC, Petr Pisar
no flags Details | Diff
Second part: Add 2016-12-31 leap second (1.37 KB, patch)
2016-07-07 12:03 UTC, Petr Pisar
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1923 0 normal SHIPPED_LIVE perl-DateTime bug fix update 2017-08-01 18:06:47 UTC

Description Petr Pisar 2016-07-07 10:57:54 UTC
perl-DateTime-1.04-5.el7.x86_64 does not support leap second the will be added to 2016-12-31 day:

$ perl -MDateTime -e 'print DateTime->new(year=>2016, month=>12, day=>31, hour=>23, minute=>59, second=>59, time_zone=>q{UTC})->add(seconds=>1), qq{\n}'
2017-01-01T00:00:00

Expected result:

$ perl -MDateTime -e 'print DateTime->new(year=>2016, month=>12, day=>31, hour=>23, minute=>59, second=>59, time_zone=>q{UTC})->add(seconds=>1), qq{\n}'
2016-12-31T23:59:60

This fixed in upstream DateTime-1.34.

Comment 1 Petr Pisar 2016-07-07 12:02:56 UTC
Created attachment 1177257 [details]
First part: Add 2015-06-30 leap second

Comment 2 Petr Pisar 2016-07-07 12:03:22 UTC
Created attachment 1177258 [details]
Second part: Add 2016-12-31 leap second

Comment 3 Petr Pisar 2016-07-07 12:04:46 UTC
Don't forget to execute ./tools/leap_seconds_header.pl in the spec file to update XS implementation:

 BuildRequires:  perl
+BuildRequires:  perl(autodie)
+BuildRequires:  perl(integer)
+BuildRequires:  perl(lib)
 BuildRequires:  perl(Module::Build)
 BuildRequires:  perl(strict)
 BuildRequires:  perl(warnings)
@@ -55,6 +62,9 @@ believed to be the birth of Jesus Christ.
 
 %prep
 %setup -q -n DateTime-%{version}
+%patch0 -p1
+%patch1 -p1
+./tools/leap_seconds_header.pl

Comment 5 Jitka Plesnikova 2017-02-08 11:21:29 UTC
How to test:

1) Run command:
  $ perl -MDateTime -e 'print DateTime->new(year=>2016, month=>12, day=>31, hour=>23, minute=>59, second=>59, time_zone=>q{UTC})->add(seconds=>1), qq{\n}'

2) Check output
Before:
2017-01-01T00:00:00

After:
2016-12-31T23:59:60

Comment 8 errata-xmlrpc 2017-08-01 18:14:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1923


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