Compare commits

...

1 Commits
master ... f23

Author SHA1 Message Date
Paul Howarth 8f02a2e80b Added the leap second coming on December 31, 2016 2016-07-06 17:49:59 +01:00
2 changed files with 84 additions and 2 deletions

View File

@ -0,0 +1,70 @@
--- c/leap_seconds.h
+++ c/leap_seconds.h
@@ -62,8 +62,10 @@
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; \
} \
} \
}
@@ -99,6 +101,7 @@
case 733407: es = 1; break; \
case 734684: es = 1; break; \
case 735779: es = 1; break; \
+ case 736329: es = 1; break; \
} \
} \
}
@@ -134,6 +137,7 @@
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,8 @@ sub _initialize {
2006 Jan. 1 +1
2009 Jan. 1 +1
2012 Jun. 1 +1
+ 2015 Jul. 1 +1
+ 2017 Jan. 1 +1
)
);
}
--- t/19leap-second.t
+++ t/19leap-second.t
@@ -1156,6 +1156,8 @@ use DateTime;
[ 2005, 12, 31 ],
[ 2008, 12, 31 ],
[ 2012, 6, 30 ],
+ [ 2015, 6, 30 ],
+ [ 2016, 12, 31 ],
) {
my $formatted = join '-', map { sprintf( '%02d', $_ ) } @{$date};
--- t/release-pp-19leap-second.t
+++ t/release-pp-19leap-second.t
@@ -1168,6 +1168,8 @@ use DateTime;
[ 2005, 12, 31 ],
[ 2008, 12, 31 ],
[ 2012, 6, 30 ],
+ [ 2015, 6, 30 ],
+ [ 2016, 12, 31 ],
) {
my $formatted = join '-', map { sprintf( '%02d', $_ ) } @{$date};

View File

@ -1,7 +1,7 @@
Name: perl-DateTime
Epoch: 2
Version: 1.18
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Date and time object for Perl
# Even though lib/DateTime.xs says `the same as Perl', it also points to the
# LICENSE file (Artistic 2.0). Reading the changelog entry for v0.56 suggests
@ -11,7 +11,13 @@ 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.18-leapsecond.patch
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: gcc
BuildRequires: perl
BuildRequires: perl-devel
BuildRequires: perl-generators
BuildRequires: perl(Module::Build)
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
@ -71,13 +77,16 @@ 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 Build.PL --installdirs=vendor --optimize="%{optflags}"
./Build
%install
./Build install --destdir=%{buildroot} --create_packlist=0
find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \;
find %{buildroot} -type f -name '*.bs' -empty -delete
%{_fixperms} %{buildroot}
%check
@ -97,6 +106,9 @@ find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \;
%{_mandir}/man3/DateTime::LeapSecond.3*
%changelog
* Wed Jul 6 2016 Paul Howarth <paul@city-fan.org> - 2:1.18-4
- Added the leap second coming on December 31, 2016
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:1.18-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild