Skip Menu |

This queue is for tickets about the Time-Piece CPAN distribution.

Report information
The Basics
Id: 123884
Status: new
Priority: 0/
Queue: Time-Piece

People
Owner: Nobody in particular
Requestors: CHOROBA [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: strptime accepts day 0
The date returned for day 01 is the same as day 00: $ perl -MTime::Piece -wE 'say Time::Piece->strptime("20170101", "%Y%m%d")' Sun Jan 1 00:00:00 2017 $ perl -MTime::Piece -wE 'say Time::Piece->strptime("20170100", "%Y%m%d")' Sun Jan 1 00:00:00 2017 On the other hand, day 32 fails: $ perl -MTime::Piece -wE 'say Time::Piece->strptime("20170132", "%Y%m%d")' Error parsing time at .../perl5/lib/perl5/x86_64-linux-thread-multi/Time/Piece.pm line 481. Similarly, 20170230 and 20170231 work, but 20170232 fails.
Moreover, 20170200 returns 20170131, etc.