Adjust tests to pass 4-digit years to Time::Local
This commit is contained in:
parent
c0734f5011
commit
4b8f7a4feb
32
TimeDate-2.30-Pass_4_digit_year_in_tests.patch
Normal file
32
TimeDate-2.30-Pass_4_digit_year_in_tests.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
Subject: tests fails in 2020
|
||||||
|
MIME-Version: 1.0
|
||||||
|
X-Mailer: MIME-tools 5.504 (Entity 5.504)
|
||||||
|
Content-Disposition: inline
|
||||||
|
X-RT-Interface: Web
|
||||||
|
Message-ID: <rt-4.0.18-3376-1519211598-1392.0-0-0@rt.cpan.org>
|
||||||
|
Content-Type: text/plain; charset="utf-8"
|
||||||
|
Content-Transfer-Encoding: binary
|
||||||
|
X-RT-Original-Encoding: utf-8
|
||||||
|
X-RT-Encrypt: 0
|
||||||
|
X-RT-Sign: 0
|
||||||
|
Content-Length: 557
|
||||||
|
|
||||||
|
similar to https://rt.cpan.org/Public/Bug/Display.html?id=124508
|
||||||
|
|
||||||
|
after 2020-01-01 $offset was shifting dates from 2002 to 2102
|
||||||
|
|
||||||
|
This trivial patch fixed it for me:
|
||||||
|
|
||||||
|
Index: TimeDate-2.30/t/getdate.t
|
||||||
|
===================================================================
|
||||||
|
--- TimeDate-2.30.orig/t/getdate.t
|
||||||
|
+++ TimeDate-2.30/t/getdate.t
|
||||||
|
@@ -156,7 +156,7 @@ Jul 22 10:00:00 UTC 2002 ;102733200
|
||||||
|
!;
|
||||||
|
|
||||||
|
require Time::Local;
|
||||||
|
-my $offset = Time::Local::timegm(0,0,0,1,0,70);
|
||||||
|
+my $offset = Time::Local::timegm(0,0,0,1,0,1970);
|
||||||
|
|
||||||
|
@data = split(/\n/, $data);
|
||||||
|
|
@ -1,11 +1,13 @@
|
|||||||
Name: perl-TimeDate
|
Name: perl-TimeDate
|
||||||
Version: 2.30
|
Version: 2.30
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Release: 18%{?dist}
|
Release: 19%{?dist}
|
||||||
Summary: A Perl module for time and date manipulation
|
Summary: A Perl module for time and date manipulation
|
||||||
License: GPL+ or Artistic
|
License: GPL+ or Artistic
|
||||||
URL: https://metacpan.org/release/TimeDate
|
URL: https://metacpan.org/release/TimeDate
|
||||||
Source0: https://cpan.metacpan.org/authors/id/G/GB/GBARR/TimeDate-%{version}.tar.gz
|
Source0: https://cpan.metacpan.org/authors/id/G/GB/GBARR/TimeDate-%{version}.tar.gz
|
||||||
|
# Adjust tests to pass 4-digit years to Time::Local, CPAN RT#124509
|
||||||
|
Patch0: TimeDate-2.30-Pass_4_digit_year_in_tests.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: perl-generators
|
BuildRequires: perl-generators
|
||||||
BuildRequires: perl(base)
|
BuildRequires: perl(base)
|
||||||
@ -29,6 +31,7 @@ textual representations of points in time.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n TimeDate-%{version}
|
%setup -q -n TimeDate-%{version}
|
||||||
|
%patch0 -p1
|
||||||
# ChangeLog is ISO-8859-1 encoded
|
# ChangeLog is ISO-8859-1 encoded
|
||||||
iconv -f iso-8859-1 -t utf8 < ChangeLog > ChangeLog.utf8
|
iconv -f iso-8859-1 -t utf8 < ChangeLog > ChangeLog.utf8
|
||||||
mv ChangeLog.utf8 ChangeLog
|
mv ChangeLog.utf8 ChangeLog
|
||||||
@ -54,6 +57,9 @@ make test
|
|||||||
%{_mandir}/man3/*.3*
|
%{_mandir}/man3/*.3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 06 2020 Petr Pisar <ppisar@redhat.com> - 1:2.30-19
|
||||||
|
- Adjust tests to pass 4-digit years to Time::Local (CPAN RT#124509)
|
||||||
|
|
||||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.30-18
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.30-18
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user