diff --git a/SOURCES/perl-5.16-centos-fix-time-local-test.patch b/SOURCES/perl-5.16-centos-fix-time-local-test.patch
deleted file mode 100644
index f8d9e9b..0000000
--- a/SOURCES/perl-5.16-centos-fix-time-local-test.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-diff -aurp a/cpan/Time-Local/t/Local.t b/cpan/Time-Local/t/Local.t
---- a/cpan/Time-Local/t/Local.t	2013-03-04 15:16:21.000000000 +0000
-+++ b/cpan/Time-Local/t/Local.t	2020-04-01 16:16:17.707231959 +0000
-@@ -95,7 +95,7 @@ for (@time, @neg_time) {
- 
-         # Test timelocal()
-         {
--            my $year_in = $year < 70 ? $year + 1900 : $year;
-+            my $year_in = $year + 1900;
-             my $time = timelocal($sec,$min,$hour,$mday,$mon,$year_in);
- 
-             my($s,$m,$h,$D,$M,$Y) = localtime($time);
-@@ -111,7 +111,7 @@ for (@time, @neg_time) {
- 
-         # Test timegm()
-         {
--            my $year_in = $year < 70 ? $year + 1900 : $year;
-+            my $year_in = $year + 1900;
-             my $time = timegm($sec,$min,$hour,$mday,$mon,$year_in);
- 
-             my($s,$m,$h,$D,$M,$Y) = gmtime($time);
-@@ -129,7 +129,6 @@ for (@time, @neg_time) {
- 
- for (@bad_time) {
-     my($year, $mon, $mday, $hour, $min, $sec) = @$_;
--    $year -= 1900;
-     $mon--;
- 
-     eval { timegm($sec,$min,$hour,$mday,$mon,$year) };
-@@ -138,14 +137,14 @@ for (@bad_time) {
- }
- 
- {
--    is(timelocal(0,0,1,1,0,90) - timelocal(0,0,0,1,0,90), 3600,
-+    is(timelocal(0,0,1,1,0,1990) - timelocal(0,0,0,1,0,1990), 3600,
-        'one hour difference between two calls to timelocal');
- 
--    is(timelocal(1,2,3,1,0,100) - timelocal(1,2,3,31,11,99), 24 * 3600,
-+    is(timelocal(1,2,3,1,0,2000) - timelocal(1,2,3,31,11,1999), 24 * 3600,
-        'one day difference between two calls to timelocal');
- 
-     # Diff beween Jan 1, 1980 and Mar 1, 1980 = (31 + 29 = 60 days)
--    is(timegm(0,0,0, 1, 2, 80) - timegm(0,0,0, 1, 0, 80), 60 * 24 * 3600,
-+    is(timegm(0,0,0, 1, 2, 1980) - timegm(0,0,0, 1, 0, 1980), 60 * 24 * 3600,
-        '60 day difference between two calls to timegm');
- }
- 
diff --git a/SOURCES/perl-5.16.3-RT-124787-Fix-Time-Local-tests.patch b/SOURCES/perl-5.16.3-RT-124787-Fix-Time-Local-tests.patch
new file mode 100644
index 0000000..fdce0eb
--- /dev/null
+++ b/SOURCES/perl-5.16.3-RT-124787-Fix-Time-Local-tests.patch
@@ -0,0 +1,62 @@
+From c4c733988fd2012cf517c021bb31ec13097b2d48 Mon Sep 17 00:00:00 2001
+From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
+Date: Fri, 16 Mar 2018 11:44:01 +0100
+Subject: [PATCH] Fix Time::Local tests
+
+in 2020, year 70 changes its meaning to 2070
+so we do what man Time::Local recommends and use 4-digit years
+---
+ cpan/Time-Local/t/Local.t | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/cpan/Time-Local/t/Local.t b/cpan/Time-Local/t/Local.t
+index 634139695f..e28c6d2129 100644
+--- a/cpan/Time-Local/t/Local.t
++++ b/cpan/Time-Local/t/Local.t
+@@ -95,7 +95,7 @@ SKIP: {
+ 
+         # Test timelocal()
+         {
+-            my $year_in = $year < 70 ? $year + 1900 : $year;
++            my $year_in = $year + 1900;
+             my $time = timelocal($sec,$min,$hour,$mday,$mon,$year_in);
+ 
+             my($s,$m,$h,$D,$M,$Y) = localtime($time);
+@@ -111,7 +111,7 @@ SKIP: {
+ 
+         # Test timegm()
+         {
+-            my $year_in = $year < 70 ? $year + 1900 : $year;
++            my $year_in = $year + 1900;
+             my $time = timegm($sec,$min,$hour,$mday,$mon,$year_in);
+ 
+             my($s,$m,$h,$D,$M,$Y) = gmtime($time);
+@@ -129,7 +129,6 @@ SKIP: {
+ 
+ for (@bad_time) {
+     my($year, $mon, $mday, $hour, $min, $sec) = @$_;
+-    $year -= 1900;
+     $mon--;
+ 
+     eval { timegm($sec,$min,$hour,$mday,$mon,$year) };
+@@ -138,14 +137,14 @@ for (@bad_time) {
+ }
+ 
+ {
+-    is(timelocal(0,0,1,1,0,90) - timelocal(0,0,0,1,0,90), 3600,
++    is(timelocal(0,0,1,1,0,1990) - timelocal(0,0,0,1,0,1990), 3600,
+        'one hour difference between two calls to timelocal');
+ 
+-    is(timelocal(1,2,3,1,0,100) - timelocal(1,2,3,31,11,99), 24 * 3600,
++    is(timelocal(1,2,3,1,0,2000) - timelocal(1,2,3,31,11,1999), 24 * 3600,
+        'one day difference between two calls to timelocal');
+ 
+     # Diff beween Jan 1, 1980 and Mar 1, 1980 = (31 + 29 = 60 days)
+-    is(timegm(0,0,0, 1, 2, 80) - timegm(0,0,0, 1, 0, 80), 60 * 24 * 3600,
++    is(timegm(0,0,0, 1, 2, 1980) - timegm(0,0,0, 1, 0, 1980), 60 * 24 * 3600,
+        '60 day difference between two calls to timegm');
+ }
+ 
+-- 
+2.13.6
+
diff --git a/SOURCES/perl-5.19.4-Fix-day-of-year-parsing.patch b/SOURCES/perl-5.19.4-Fix-day-of-year-parsing.patch
new file mode 100644
index 0000000..8f5c04a
--- /dev/null
+++ b/SOURCES/perl-5.19.4-Fix-day-of-year-parsing.patch
@@ -0,0 +1,34 @@
+diff -up perl-5.16.3/cpan/Time-Piece/Piece.pm.orig perl-5.16.3/cpan/Time-Piece/Piece.pm
+diff -up perl-5.16.3/cpan/Time-Piece/Piece.xs.orig perl-5.16.3/cpan/Time-Piece/Piece.xs
+--- perl-5.16.3/cpan/Time-Piece/Piece.xs.orig	2019-09-12 09:15:44.736310909 +0200
++++ perl-5.16.3/cpan/Time-Piece/Piece.xs	2019-09-12 09:17:16.165736334 +0200
+@@ -584,6 +584,7 @@ label:
+ 				return 0;
+ 
+ 			tm->tm_yday = i - 1;
++			tm->tm_mday = 0;
+ 			break;
+ 
+ 		case 'M':
+diff -up perl-5.16.3/cpan/Time-Piece/t/02core.t.orig perl-5.16.3/cpan/Time-Piece/t/02core.t
+--- perl-5.16.3/cpan/Time-Piece/t/02core.t.orig	2019-09-12 09:18:37.932011102 +0200
++++ perl-5.16.3/cpan/Time-Piece/t/02core.t	2019-09-12 09:19:15.059589937 +0200
+@@ -1,4 +1,4 @@
+-use Test::More tests => 95;
++use Test::More tests => 96;
+
+ my $is_win32 = ($^O =~ /Win32/);
+ my $is_qnx = ($^O eq 'qnx');
+@@ -215,6 +215,12 @@ cmp_ok(Time::Piece->strptime("2002/12/31
+ cmp_ok(Time::Piece->strptime("2002/07/10", '%Y/%m/%d')->isdst, '==', 0);
+ cmp_ok(Time::Piece->strptime("2002/07/10", '%Y/%m/%d')->day_of_week, '==', 3);
+ 
++is(
++  Time::Piece->strptime('12212', "%y%j")->ymd(),
++  '2012-07-30',
++  "day of the year parsing",
++);
++
+ cmp_ok(
+   Time::Piece->strptime("2000/02/29 12:34:56", '%Y/%m/%d %H:%M:%S')->epoch,
+   '==',
diff --git a/SPECS/perl.spec b/SPECS/perl.spec
index c54c66e..f21be92 100644
--- a/SPECS/perl.spec
+++ b/SPECS/perl.spec
@@ -31,7 +31,7 @@
 Name:           perl
 Version:        %{perl_version}
 # release number must be even higher, because dual-lived modules will be broken otherwise
-Release:        295%{?dist}
+Release:        297%{?dist}
 Epoch:          %{perl_epoch}
 Summary:        Practical Extraction and Report Language
 Group:          Development/Languages
@@ -183,8 +183,12 @@ Patch43:        perl-5.16.3-Perl_my_setenv-handle-integer-wrap.patch
 # fixed in perl-libnet-1.23
 Patch44:        perl-5.16.3-Catch-timeout-condition-while-doing-an-abort.patch
 
-# Fix 2020 test
-Patch9999:      perl-5.16-centos-fix-time-local-test.patch
+# Fix day of year parsing (like "%y%j") - bug #1751381, CPAN RT#88211
+Patch45:        perl-5.19.4-Fix-day-of-year-parsing.patch
+
+# Fix Local.t test which fails in 2020, CPAN#124787
+# in upstream after 5.29.1, in dual-life package after 1.26
+Patch46:        perl-5.16.3-RT-124787-Fix-Time-Local-tests.patch
 
 # Update some of the bundled modules
 # see http://fedoraproject.org/wiki/Perl/perl.spec for instructions
@@ -1989,8 +1993,8 @@ tarball from perl.org.
 %patch42 -p1
 %patch43 -p1
 %patch44 -p1
-
-%patch9999 -p1
+%patch45 -p1
+%patch46 -p1
 
 %if !%{defined perl_bootstrap}
 # Local patch tracking
@@ -2037,11 +2041,12 @@ perl -x patchlevel.h \
     'RHEL Patch42: Do not overload ".." in Math::BigInt (CPAN RT#80182)' \
     'RHEL Patch43: Fix CVE-2018-18311 Integer overflow leading to buffer overflow' \
     'RHEL Patch44: Fix a spurious timeout in Net::FTP::close (CPAN RT#18504)' \
+    'RHEL Patch45: Fix day of year parsing (CPAN RT#88211)' \
     %{nil}
 %endif
 
 #copy the example script
-cp -a %{SOURCE5} .
+install -m 0644 %{SOURCE5} .
 
 #
 # Candidates for doc recoding (need case by case review):
@@ -3719,6 +3724,12 @@ sed \
 
 # Old changelog entries are preserved in CVS.
 %changelog
+* Mon Feb 24 2020 Petr Pisar <ppisar@redhat.com> - 4:5.16.3-297
+- Fix a file mode of a perl-example.stp example (bug #1806523)
+
+* Mon Jan 20 2020 Jitka Plesnikova <jplesnik@redhat.com> - 4:5.16.3-296
+- Fix day of year parsing (like "%y%j") (bug #1751381)
+
 * Wed Jul 24 2019 Petr Pisar <ppisar@redhat.com> - 4:5.16.3-295
 - Fix a spurious timeout in Net::FTP::close (bug #1626107)