From 6b732c0c514bd256ebc4b984d604487a0f1b2f4d Mon Sep 17 00:00:00 2001 From: Paul Howarth <p...@city-fan.org> Date: Wed, 6 Jul 2016 17:34:23 +0100 Subject: Added the leap second coming on December 31, 2016
--- DateTime-1.28-leapsecond.patch | 67 ++++++++++++++++++++++++++++++++++++++++++ perl-DateTime.spec | 9 +++++- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 DateTime-1.28-leapsecond.patch diff --git a/DateTime-1.28-leapsecond.patch b/DateTime-1.28-leapsecond.patch new file mode 100644 index 0000000..ab23e86 --- /dev/null +++ b/DateTime-1.28-leapsecond.patch @@ -0,0 +1,67 @@ +--- leap_seconds.h ++++ leap_seconds.h +@@ -65,8 +65,10 @@ Do not edit this file directly. + ls = 24; \ + } else if (utc_rd >= 734685 && utc_rd < 735780) { \ + ls = 25; \ ++ } else if (utc_rd >= 735780 && utc_rd < 736330) { \ ++ ls = 26; \ + } else { \ +- ls = 26; \ ++ ls = 27; \ + } \ + } \ + } +@@ -102,6 +104,7 @@ Do not edit this file directly. + case 733407: es = 1; break; \ + case 734684: es = 1; break; \ + case 735779: es = 1; break; \ ++ case 736329: es = 1; break; \ + } \ + } \ + } +@@ -137,6 +140,7 @@ Do not edit this file directly. + case 733407: dl = 86400 + 1; break; \ + case 734684: dl = 86400 + 1; break; \ + case 735779: dl = 86400 + 1; break; \ ++ case 736329: dl = 86400 + 1; break; \ + } \ + } \ + } +--- leaptab.txt ++++ leaptab.txt +@@ -24,3 +24,4 @@ + 2009 Jan. 1 +1 + 2012 Jul. 1 +1 + 2015 Jul. 1 +1 ++2017 Jan. 1 +1 +--- lib/DateTime/LeapSecond.pm ++++ lib/DateTime/LeapSecond.pm +@@ -109,6 +109,7 @@ sub _initialize { + 2009 Jan. 1 +1 + 2012 Jun. 1 +1 + 2015 Jul. 1 +1 ++ 2017 Jan. 1 +1 + ) + ); + } +--- t/19leap-second.t ++++ t/19leap-second.t +@@ -1157,6 +1157,7 @@ use DateTime; + [ 2008, 12, 31 ], + [ 2012, 6, 30 ], + [ 2015, 6, 30 ], ++ [ 2016, 12, 31 ], + ) { + my $formatted = join '-', map { sprintf( '%02d', $_ ) } @{$date}; + +--- xt/author/pp-19leap-second.t ++++ xt/author/pp-19leap-second.t +@@ -1161,6 +1161,7 @@ use DateTime; + [ 2008, 12, 31 ], + [ 2012, 6, 30 ], + [ 2015, 6, 30 ], ++ [ 2016, 12, 31 ], + ) { + my $formatted = join '-', map { sprintf( '%02d', $_ ) } @{$date}; + diff --git a/perl-DateTime.spec b/perl-DateTime.spec index 361611a..82fc548 100644 --- a/perl-DateTime.spec +++ b/perl-DateTime.spec @@ -1,12 +1,13 @@ Name: perl-DateTime Epoch: 2 Version: 1.28 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Date and time object for Perl License: Artistic 2.0 Group: Development/Libraries URL: http://search.cpan.org/dist/DateTime/ Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-%{version}.tar.gz +Patch0: DateTime-1.28-leapsecond.patch BuildRequires: coreutils BuildRequires: findutils BuildRequires: gcc @@ -65,6 +66,9 @@ believed to be the birth of Jesus Christ. %prep %setup -q -n DateTime-%{version} +# Add the leap second coming on December 31, 2016 +%patch0 + %build perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" make %{?_smp_mflags} @@ -90,6 +94,9 @@ make test %{_mandir}/man3/DateTime::LeapSecond.3* %changelog +* Wed Jul 6 2016 Paul Howarth <p...@city-fan.org> - 2:1.28-2 +- Added the leap second coming on December 31, 2016 + * Sun May 22 2016 Paul Howarth <p...@city-fan.org> - 2:1.28-1 - Update to 1.28 - Fixed handling of some floating point epochs; since DateTime treated the -- cgit v0.12 http://pkgs.fedoraproject.org/cgit/perl-DateTime.git/commit/?h=perl-DateTime-1.28-2.fc24&id=6b732c0c514bd256ebc4b984d604487a0f1b2f4d -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org