Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:Leap:15.2:Staging:F
perl-TimeDate
perl-TimeDate-getdate.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-TimeDate-getdate.patch of Package perl-TimeDate
From: Bernhard M. Wiedemann <bwiedemann suse de> Subject: Fix bsc#1159990 Date: 2020-01-11 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); Index: TimeDate-2.30/lib/Date/Parse.pm =================================================================== --- TimeDate-2.30.orig/lib/Date/Parse.pm +++ TimeDate-2.30/lib/Date/Parse.pm @@ -195,7 +195,7 @@ sub { } } - $year -= 1900 if defined $year && $year > 1900; + $year -= 1900 if defined $year && $year > 2000; $zone += 3600 if defined $zone && $dst; $ss += "0.$frac" if $frac; Index: TimeDate-2.30/t/cpanrt.t =================================================================== --- TimeDate-2.30.orig/t/cpanrt.t +++ TimeDate-2.30/t/cpanrt.t @@ -1,7 +1,7 @@ use Date::Format qw(time2str strftime); use Date::Parse qw(strptime str2time); -print "1..8\n"; +print "1..10\n"; my $i = 1; @@ -53,3 +53,11 @@ my $i = 1; print "not " if str2time('16 Oct 09') < 0; print "ok ", $i++, "\n"; } + +{ # https://rt.cpan.org/Public/Bug/Display.html?id=124509 year 2020 problem + print "# 1970-01-01 => 0\n"; + print "not " if str2time('1970-01-01') != 0; + print "ok ", $i++, "\n"; + print "not " if str2time('01 Jan 70') == 0; + print "ok ", $i++, "\n"; +}
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor