Hello community,
here is the log from the commit of package perl-Email-Date-Format for
openSUSE:Factory checked in at 2019-06-12 13:17:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Email-Date-Format (Old)
and /work/SRC/openSUSE:Factory/.perl-Email-Date-Format.new.4811 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Email-Date-Format"
Wed Jun 12 13:17:06 2019 rev:24 rq:709098 version:1.005
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Email-Date-Format/perl-Email-Date-Format.changes
2015-04-15 16:25:14.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Email-Date-Format.new.4811/perl-Email-Date-Format.changes
2019-06-12 13:17:10.556635685 +0200
@@ -1,0 +2,12 @@
+Tue Jun 11 09:08:36 UTC 2019 - Pedro Monreal Gonzalez
<[email protected]>
+
+- Updated spec file with spec-cleaner
+- Added required dependencies
+- Capitalize summary
+
+-------------------------------------------------------------------
+Sun Jun 9 12:40:54 UTC 2019 - Bernhard Wiedemann <[email protected]>
+
+- Add fix-time-local.patch to call Time::Local correctly
+
+-------------------------------------------------------------------
New:
----
fix-time-local.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Email-Date-Format.spec ++++++
--- /var/tmp/diff_new_pack.0Yt2QH/_old 2019-06-12 13:17:10.912635311 +0200
+++ /var/tmp/diff_new_pack.0Yt2QH/_new 2019-06-12 13:17:10.916635307 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-Email-Date-Format
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 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
@@ -12,24 +12,30 @@
# 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/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
+%define cpan_name Email-Date-Format
Name: perl-Email-Date-Format
Version: 1.005
Release: 0
-%define cpan_name Email-Date-Format
-Summary: produce RFC 2822 date strings
-License: Artistic-1.0 or GPL-1.0+
+Summary: Produce RFC 2822 date strings
+License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
-Url: http://search.cpan.org/dist/Email-Date-Format/
-Source:
http://www.cpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{version}.tar.gz
-BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+URL: https://metacpan.org/release/%{cpan_name}
+Source:
https://cpan.metacpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{version}.tar.gz
+Patch0: fix-time-local.patch
BuildRequires: perl
BuildRequires: perl-macros
+BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Test::More) >= 0.96
+BuildRequires: perl(Test::Pod) >= 1.41
+Requires: perl(Exporter) >= 5.57
+Requires: perl(Time::Local)
+Requires: perl(strict)
+Requires: perl(warnings)
+BuildArch: noarch
%{perl_requires}
%description
@@ -39,13 +45,14 @@
%prep
%setup -q -n %{cpan_name}-%{version}
+%patch0 -p1
%build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
-%{__make} %{?_smp_mflags}
+perl Makefile.PL INSTALLDIRS=vendor
+make %{?_smp_mflags}
%check
-%{__make} test
+make %{?_smp_mflags} test
%install
%perl_make_install
@@ -54,6 +61,7 @@
%files -f %{name}.files
%defattr(-,root,root,755)
-%doc Changes LICENSE README
+%license LICENSE
+%doc Changes README
%changelog
++++++ fix-time-local.patch ++++++
Author: Bernhard M. Wiedemann <bwiedemann suse de>
Date: 2018-02-23
https://rt.cpan.org/Public/Bug/Display.html?id=124530
Index: Email-Date-Format-1.005/lib/Email/Date/Format.pm
===================================================================
--- Email-Date-Format-1.005.orig/lib/Email/Date/Format.pm
+++ Email-Date-Format-1.005/lib/Email/Date/Format.pm
@@ -54,8 +54,12 @@ use Time::Local ();
sub _tz_diff {
my ($time) = @_;
- my $diff = Time::Local::timegm(localtime $time)
- - Time::Local::timegm(gmtime $time);
+ my @localtime = localtime $time;
+ my @gmtime = gmtime $time;
+ $localtime[5] += 1900;
+ $gmtime[5] += 1900;
+ my $diff = Time::Local::timegm(@localtime)
+ - Time::Local::timegm(@gmtime);
my $direc = $diff < 0 ? '-' : '+';
$diff = abs $diff;
Index: Email-Date-Format-1.005/t/basic.t
===================================================================
--- Email-Date-Format-1.005.orig/t/basic.t
+++ Email-Date-Format-1.005/t/basic.t
@@ -1,4 +1,4 @@
-use Test::More tests => 3;
+use Test::More tests => 7;
use strict;
$^W = 1;
@@ -12,7 +12,10 @@ is(
my $birthday = 1153432704; # no, really!
-my $tz = sprintf "%s%02u%02u", Email::Date::Format::_tz_diff(1153432704);
+sub tz($) { sprintf "%s%02u%02u", Email::Date::Format::_tz_diff(shift) }
+
+local $ENV{TZ} = "UTC+4";
+my $tz = tz(1153432704);
SKIP: {
skip "test only useful in US/Eastern, -0400, not $tz", 1 if $tz ne '-0400';
@@ -29,3 +32,12 @@ is(
'Thu, 20 Jul 2006 21:58:24 +0000',
"rjbs's birthday date format properly in GMT",
);
+
+my $badyear = 1900 + ((gmtime)[5] - 49) % 100;
+my $badt = Time::Local::timegm(0, 0, 0, 1, 0, $badyear);
+$ENV{TZ} = "UTC-11";
+is(tz($badt - 60), "+1100", "positive timezone before year rollover");
+is(tz($badt + 60), "+1100", "positive timezone after year rollover");
+$ENV{TZ} = "UTC+9";
+is(tz($badt - 60), "-0900", "negative timezone before year rollover");
+is(tz($badt + 60), "-0900", "negative timezone after year rollover");