-
Notifications
You must be signed in to change notification settings - Fork 510
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
Skip IANA TZ names when parsing %Z specifier #473
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! Could you also modify the %Z row in src/format/strftime.rs
to state that in parsing mode this discards all non-whitespace characters?
Aside: it is kind of wild that that is the behavior of glibc, I had to confirm it myself.
Done and done
Well, it's a lot of work with so little payoff. Also, I probably should have provided a link to the glibc source code to simplify the verification, sorry for that |
No apologies necessary, it was straightforward to verify. Thanks, very much for this! |
In chronotope/chrono#473, chrono changed how %Z is handled, and was changed to simply skip over any non-whitespace characters in the timezone section, just like glibc's `strptime`. I'm not sure if this is the right fix, but it gets the tests to pass.
In chronotope/chrono#473, chrono changed how %Z is handled, and was changed to simply skip over any non-whitespace characters in the timezone section, just like glibc's `strptime`. I'm not sure if this is the right fix, but it gets the tests to pass.
In chronotope/chrono#473, chrono changed how %Z is handled, and was changed to simply skip over any non-whitespace characters in the timezone section, just like glibc's `strptime`. I'm not sure if this is the right fix, but it gets the tests to pass.
In chronotope/chrono#473, chrono changed how %Z is handled, and was changed to simply skip over any non-whitespace characters in the timezone section, just like glibc's `strptime`. I'm not sure if this is the right fix, but it gets the tests to pass.
Thanks for contributing to chrono!
about adding the PR number)
we can't reintroduce it?
This PR prevents
%Z
specifier from causing an instant parsing failure, instead, skipping chars until the next whiltespace-like char, as implemented in glibc strptime.