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

chrono panics on a valid input string #531

Closed
omayerg opened this issue Jan 31, 2021 · 1 comment
Closed

chrono panics on a valid input string #531

omayerg opened this issue Jan 31, 2021 · 1 comment

Comments

@omayerg
Copy link

omayerg commented Jan 31, 2021

 use chrono::format;

fn main() {
    let p = &mut format::Parsed::new();
    format::parse(p, "MONYAŽA Šander`",
    format::StrftimeItems::new("%A, %e-%h-%y %H:%M:%S"));
    
    println!("No panic");
}

(Playground)

Expected null result, but actually it panics.
It seems chrono parser misses the case where a string starts with a valid datetime part, e.g. SUN, MON, TUE... but then have non-ascii characters. For example, running the above string without letting it start with any three letters that represents a day of week doesn't panic.

@pitdicker
Copy link
Collaborator

This is fixed by #1024.

@djc djc closed this as completed Apr 22, 2023
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

3 participants