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

DateTime::parse_from_str accepts negative year with %Y #758

Closed
alex opened this issue Aug 6, 2022 · 0 comments
Closed

DateTime::parse_from_str accepts negative year with %Y #758

alex opened this issue Aug 6, 2022 · 0 comments

Comments

@alex
Copy link
Contributor

alex commented Aug 6, 2022

This contradicts the claims at: https://docs.rs/chrono/latest/chrono/format/strftime/index.html#fn1

Minimal example:

use chrono;

fn main() {
    dbg!(chrono::DateTime::parse_from_str("-1\n110723459+1002", "%Y%m%d%H%M%S%z"));
}

Reproduced with 0.4.20

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