Dual-Life / Time-Piece

Object Oriented time objects
Other
15 stars 33 forks source link

strptime can't parse years before 1900 #56

Open choroba opened 2 years ago

choroba commented 2 years ago
'Time::Piece'->strptime('1899-12-31', '%Y-%m-%d')

fails with

Error parsing time at /home/choroba/opensource/Time-Piece/blib/lib/Time/Piece.pm line 481.

But the library handles the date just fine, e.g.

'Time::Piece'->strptime('1900-01-01', '%Y-%m-%d') - Time::Seconds::ONE_DAY;  # Sun Dec 31 00:00:00 1899

If I ran git bisect correctly, it was working OK before 1.17.