8
0

Compare commits

3 Commits

4 changed files with 51 additions and 1 deletions

12
README.md Normal file
View File

@@ -0,0 +1,12 @@
## Build Results
Current state of perl in openSUSE:Factory is
![Factory build results](https://br.opensuse.org/status/openSUSE:Factory/perl-Time-modules/standard)
The current state of perl in the devel project build (devel:languages:perl)
![Devel project build results](https://br.opensuse.org/status/devel:languages:perl/perl-Time-modules)

30
fixtest.patch Normal file
View File

@@ -0,0 +1,30 @@
Author: Bernhard M. Wiedemann <bwiedemann suse.de>
Date: 2018-10-31
Make tests pass in the future
Without this patch, 33 tests failed in 2033 by misinterpreting 2-digit years
e.g.
two digit year '94' expanded into 2094
jd(2094, 11, 06) = 2486188
before 2486188 08 49 37
after rs 2486188 8 49 37
jd_secondsgm(2486188, 8, 49, 37) = 3939871777
adjusting secs for GMT: 0
returning 3939871777.
not ok 273 # Sunday, 06-Nov-94 08:49:37 GMT
Expected(784111777): Sun Nov 6 0:49:37 1994 PST
Got(3939871777): Sat Nov 6 0:49:37 2094 PST (11/06 08:49 AM GMT)
Index: Time-modules-2013.0912/t/datetime.t
===================================================================
--- Time-modules-2013.0912.orig/t/datetime.t
+++ Time-modules-2013.0912/t/datetime.t
@@ -437,6 +437,7 @@ while (@sdt) {
$ar = shift(@sdt);
$toparse = shift(@$ar);
%opts = @$ar;
+ $opts{NOW} //= 1000000000;
if (defined $opts{NOW}) {
$opts{NOW} -= $epoch;
}

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Nov 14 20:43:57 UTC 2024 - Bernhard Wiedemann <bwiedemann@suse.com>
- Add fixtest.patch to fix tests after 2033 (boo#1102840)
-------------------------------------------------------------------
Wed Sep 12 13:34:03 UTC 2018 - pmonrealgonzalez@suse.com

View File

@@ -24,6 +24,8 @@ License: SUSE-Permissive
Group: Development/Libraries/Perl
Url: https://metacpan.org/release/MUIR/Time-modules-2013.0912
Source: https://www.cpan.org/modules/by-module/Time/Time-modules-%{version}.tar.gz
Source100: README.md
Patch0: fixtest.patch
BuildRequires: perl
BuildRequires: perl-macros
%{perl_requires}
@@ -34,13 +36,14 @@ BuildRequires: timezone
Perl modules providing various time functions.
%prep
%setup -q -n Time-modules-%{version}
%autosetup -p1 -n Time-modules-%{version}
%build
perl Makefile.PL
make %{?_smp_mflags}
%check
#cd ~/rpmbuild/BUILD/Time-modules-2013.0912/ && PERL5LIB=lib perl t/datetime.t | tee /tmp/datetime.out ; exit 1
make %{?_smp_mflags} test
%install