Hello community,

here is the log from the commit of package perl-TimeDate for 
openSUSE:Leap:15.2:SLE-workarounds checked in at 2020-06-12 11:50:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2:SLE-workarounds/perl-TimeDate (Old)
 and      /work/SRC/openSUSE:Leap:15.2:SLE-workarounds/.perl-TimeDate.new.3606 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-TimeDate"

Fri Jun 12 11:50:26 2020 rev:1 rq: version:2.30

Changes:
--------
New Changes file:

--- /dev/null   2020-05-28 02:28:09.919761697 +0200
+++ 
/work/SRC/openSUSE:Leap:15.2:SLE-workarounds/.perl-TimeDate.new.3606/perl-TimeDate.changes
  2020-06-12 11:50:27.534698585 +0200
@@ -0,0 +1,170 @@
+-------------------------------------------------------------------
+Thu Jun 11 12:20:59 UTC 2020 - Pedro Monreal Gonzalez 
<[email protected]>
+
+- Parse out century if specified (strptime) [bsc#1172834]
+- Add perl-TimeDate-parse-out-century-if-specified.patch
+
+-------------------------------------------------------------------
+Tue Feb  4 13:23:42 UTC 2020 - Pedro Monreal Gonzalez 
<[email protected]>
+
+- Fix another year-2020 bug [bsc#1162433]
+  * Update patch perl-TimeDate-getdate.patch
+
+-------------------------------------------------------------------
+Thu Jan  2 12:42:40 UTC 2020 - Pedro Monreal Gonzalez 
<[email protected]>
+
+- Fix test getdate [bsc#1159990]
+- Add perl-TimeDate-getdate.patch
+
+-------------------------------------------------------------------
+Sat May  2 09:53:14 UTC 2015 - [email protected]
+
+- updated to 2.30
+   see /usr/share/doc/packages/perl-TimeDate/ChangeLog
+
+  2.30 -- Mon Feb 18 13:31:03 CST 2013
+    * Syncing distribution version number with Date::Parse, not functional 
changes
+
+- remove TimeDate-deprecated_array_use.patch and TimeDate-podfile-patch
+  and regenerat with cpanspec
+
+-------------------------------------------------------------------
+Tue Aug 30 18:19:41 UTC 2011 - [email protected]
+
+- standardized "Authors:" format in description of perl-TimeDate.spec
+
+-------------------------------------------------------------------
+Tue Mar 15 10:08:12 UTC 2011 - [email protected]
+
+- license update: GPL+ or Artistic
+  License is the same as Perl which expands to GPL+ or Artistic. See README, 
Format.pm, Parse.pm
+
+-------------------------------------------------------------------
+Wed Feb  2 13:41:52 UTC 2011 - [email protected]
+
+- bzipped source tarball 
+
+-------------------------------------------------------------------
+Tue Nov 30 19:20:55 UTC 2010 - [email protected]
+
+- switch to perl_requires macro
+
+-------------------------------------------------------------------
+Tue Apr 20 22:07:57 UTC 2010 - [email protected]
+
+- fix build
+  o reworked TimeDate-deprecated_array_use.patch (was for timegm)
+    removed obsolete part (timegm was replaced by timelocal)
+- cleanup spec
+  o add missing Url
+- fix deps for perl-macros
+- removed .packlist, perllocal.pod files
+  > noarch package
+- rpmlint
+  o script-without-shebang > 644
+
+-------------------------------------------------------------------
+Mon Apr 19 13:51:59 CEST 2010 - [email protected]
+
+- update to 1.20:
+  * Typo => s/timezome/timezone/ [yanick]
+  * RT#52387 Fix %s formating to use timelocal when no timezone is given
+  * RT#51664 fix str2time('16 Oct 09') to not give a negative result
+
+-------------------------------------------------------------------
+Fri Sep 25 22:00:57 UTC 2009 - [email protected]
+
+- New upstream version 1.19
+  * Add support for dates like Jul-13-1999 (Brett Warden)
+  * Added Icelandic language (Tomas Edwardsson)
+  * Added Romanian language (Doru Petrescu)
+  * Added Russian language (Denis Poznyakov & Danil Pismenny)
+  * Added Turkish language (Burak Gursoy)
+  * Added Spanish language (Adrian Mugnolo)
+  * Added Chinese language (Kang-min Liu)
+  * Support parsing dates like 2002-02-26-10:37:21.141 as used by lpd
+  * Support Z timezone when only the time is specified
+  * Added METDST to Time::Zone
+  * Added AKST/AKDT to Time::Zone
+
+-------------------------------------------------------------------
+Fri Jul 31 16:21:55 CEST 2009 - [email protected]
+
+- fix podfile
+
+-------------------------------------------------------------------
+Sat Jul 25 19:45:30 CEST 2009 - [email protected]
+
+- spec mods
+  * removed ^----------
+  * removed ^#---------
+
+-------------------------------------------------------------------
+Tue Jun 23 18:37:55 CEST 2009 - [email protected]
+
+- added perl-macros
+- fixed summary, description
+
+-------------------------------------------------------------------
+Wed Jan 25 21:40:00 CET 2006 - [email protected]
+
+- converted neededforbuild to BuildRequires
+
+-------------------------------------------------------------------
+Sun Jan 11 10:27:15 CET 2004 - [email protected]
+
+- build as user
+
+-------------------------------------------------------------------
+Fri Aug 22 15:55:40 CEST 2003 - [email protected]
+
+- require the perl version we build with
+
+-------------------------------------------------------------------
+Mon Jul 21 11:36:19 CEST 2003 - [email protected]
+
+- update to version 1.16
+- using perl_vendorlib and perl_vendorarch instead of
+  perl_sitearch and perl_archlib
+
+-------------------------------------------------------------------
+Wed Jun 18 09:03:37 CEST 2003 - [email protected]
+
+- package directories
+
+-------------------------------------------------------------------
+Mon May 26 00:25:54 CEST 2003 - [email protected]
+
+- remove unpackaged files from buildroot
+
+-------------------------------------------------------------------
+Thu Jan 16 18:03:10 CET 2003 - [email protected]
+
+- update to version 1.14
+- fixed depricated array use in timegm() 
+
+-------------------------------------------------------------------
+Thu Aug  8 18:52:19 CEST 2002 - [email protected]
+
+- use sitearch macro
+
+-------------------------------------------------------------------
+Tue Jul  2 17:40:06 MEST 2002 - [email protected]
+
+- remove race in .packlist generation
+
+-------------------------------------------------------------------
+Tue Nov  7 14:12:56 CET 2000 - [email protected]
+
+- added .packlist to file list and removed BuildRoot path
+
+-------------------------------------------------------------------
+Tue Nov  7 10:34:18 CET 2000 - [email protected]
+
+- removed BuildRoot path from perllocal.pod
+
+-------------------------------------------------------------------
+Mon Nov  6 19:53:03 CET 2000 - [email protected]
+
+- initial version (1.10)
+

New:
----
  TimeDate-2.30.tar.gz
  cpanspec.yml
  perl-TimeDate-getdate.patch
  perl-TimeDate-parse-out-century-if-specified.patch
  perl-TimeDate.changes
  perl-TimeDate.spec

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-TimeDate.spec ++++++
#
# spec file for package perl-TimeDate
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           perl-TimeDate
Version:        2.30
Release:        0
%define cpan_name TimeDate
Summary:        TimeDate Perl module
License:        Artistic-1.0 or GPL-1.0+
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/TimeDate/
Source0:        
https://cpan.metacpan.org/authors/id/G/GB/GBARR/%{cpan_name}-%{version}.tar.gz
Source1:        cpanspec.yml
Patch0:         perl-TimeDate-getdate.patch
# PATCH-FIX-UPSTREAM bsc#1172834 Parse out century if specified (strptime)
Patch1:         perl-TimeDate-parse-out-century-if-specified.patch
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
%{perl_requires}

%description
Date::Parse provides two routines for parsing date strings into time values.

str2time(DATE [, ZONE])

   str2time parses DATE and returns a unix time value, or undef upon failure.
    ZONE, if given, specifies the timezone to assume when parsing if the date
    string does not specify a timezome.

strptime(DATE [, ZONE])

   strptime takes the same arguments as str2time but returns an array of values
    ($ss,$mm,$hh,$day,$month,$year,$zone). Elements are only defined if they
    could be extracted from the date string. The $zone element is the timezone
    offset in seconds from GMT. An empty array is returned upon failure.

%prep
%setup -q -n %{cpan_name}-%{version}
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
%patch0 -p1
%patch1 -p1

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}

%check
%{__make} test

%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist

%files -f %{name}.files
%defattr(-,root,root,755)
%doc ChangeLog README

%changelog
++++++ cpanspec.yml ++++++
---
description: |-
 Date::Parse provides two routines for parsing date strings into time values.

 str2time(DATE [, ZONE])

    str2time parses DATE and returns a unix time value, or undef upon failure.
     ZONE, if given, specifies the timezone to assume when parsing if the date
     string does not specify a timezome.

 strptime(DATE [, ZONE])

    strptime takes the same arguments as str2time but returns an array of values
     ($ss,$mm,$hh,$day,$month,$year,$zone). Elements are only defined if they
     could be extracted from the date string. The $zone element is the timezone
     offset in seconds from GMT. An empty array is returned upon failure.

patches:
  perl-TimeDate-getdate.patch: -p1
++++++ perl-TimeDate-getdate.patch ++++++
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";
+}
++++++ perl-TimeDate-parse-out-century-if-specified.patch ++++++
>From d7450983cbc7ea9d54662c9a181824d3e8bcfbf3 Mon Sep 17 00:00:00 2001
From: Jonathan Scott Duff <[email protected]>
Date: Sun, 1 Mar 2015 23:43:25 -0600
Subject: [PATCH] [strptime] Parse out century if specified

If we've been given a year that's got the century attached (i.e., the
year is > 1900), store the century.  Then use this information to defeat
the guessing behavior of timegm.
---
 lib/Date/Parse.pm | 20 +++++++++++++-------
 t/cpanrt.t        |  2 +-
 2 files changed, 14 insertions(+), 8 deletions(-)

Index: TimeDate-2.30/lib/Date/Parse.pm
===================================================================
--- TimeDate-2.30.orig/lib/Date/Parse.pm
+++ TimeDate-2.30/lib/Date/Parse.pm
@@ -73,7 +73,7 @@ sub {
   my $dtstr = lc shift;
   my $merid = 24;
 
-  my($year,$month,$day,$hh,$mm,$ss,$zone,$dst,$frac);
+  my($century,$year,$month,$day,$hh,$mm,$ss,$zone,$dst,$frac);
 
   $zone = tz_offset(shift) if @_;
 
@@ -195,12 +195,15 @@ sub {
     }
   }
 
-  $year -= 1900 if defined $year && $year > 2000;
+  if (defined $year && $year > 1900) {
+    $century = int($year / 100);
+    $year -= 1900;
+  }
 
   $zone += 3600 if defined $zone && $dst;
   $ss += "0.$frac" if $frac;
 
-  return ($ss,$mm,$hh,$day,$month,$year,$zone);
+  return ($ss,$mm,$hh,$day,$month,$year,$zone,$century);
 }
 ESQ
 
@@ -233,7 +236,7 @@ sub str2time
  return undef
        unless @t;
 
- my($ss,$mm,$hh,$day,$month,$year,$zone) = @t;
+ my($ss,$mm,$hh,$day,$month,$year,$zone, $century) = @t;
  my @lt  = localtime(time);
 
  $hh    ||= 0;
@@ -252,6 +255,9 @@ sub str2time
  $year = ($month > $lt[4]) ? ($lt[5] - 1) : $lt[5]
        unless(defined $year);
 
+ # we were given a 4 digit year, so let's keep using those
+ $year += 1900 if defined $century;
+
  return undef
        unless($month <= 11 && $day >= 1 && $day <= 31
                && $hh <= 23 && $mm <= 59 && $ss <= 59);
@@ -317,9 +323,9 @@ date string does not specify a timezone.
 =item strptime(DATE [, ZONE])
 
 C<strptime> takes the same arguments as str2time but returns an array of
-values C<($ss,$mm,$hh,$day,$month,$year,$zone)>. Elements are only defined
-if they could be extracted from the date string. The C<$zone> element is
-the timezone offset in seconds from GMT. An empty array is returned upon
+values C<($ss,$mm,$hh,$day,$month,$year,$zone,$century)>. Elements are only
+defined if they could be extracted from the date string. The C<$zone> element
+is the timezone offset in seconds from GMT. An empty array is returned upon
 failure.
 
 =head1 MULTI-LANGUAGE SUPPORT
Index: TimeDate-2.30/t/cpanrt.t
===================================================================
--- TimeDate-2.30.orig/t/cpanrt.t
+++ TimeDate-2.30/t/cpanrt.t
@@ -22,7 +22,7 @@ my $i = 1;
     my @t = strptime($str);
     my $t = join ":", map { defined($_) ? $_ : "-" } @t;
     print "# $str => $t\n";
-    print "not " unless $t eq "-:35:22:30:10:108:3600";
+    print "not " unless $t eq "-:35:22:30:10:108:3600:20";
     print "ok ", $i++, "\n";
   }
 }

Reply via email to