Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strptime() succeeding on invalid input #53

Open
x-qq opened this issue Apr 20, 2021 · 0 comments
Open

strptime() succeeding on invalid input #53

x-qq opened this issue Apr 20, 2021 · 0 comments

Comments

@x-qq
Copy link

x-qq commented Apr 20, 2021

Current behavior:

% perl -E 'use strict; use warnings; use Time::Piece; for my $input (qw[2020 2020- 2020-11]) { say Time::Piece->strptime($input, "%Y-%m-%d")->ymd }'                                                                                                                                    
2020-01-01
2020-01-01
2020-11-01
%

Expected behavior: unless I am missing something, all three of these should raise an exception due to mismatch between format string and provided value.

Environment:
Module version: 1.3401
Perl: 5.26.2
OS: Debian GNU/Linux Unstable amd64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant