Blob Blame History Raw
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,
   '==',