Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix parsing dates with months abbreviated in some locales
Current code first attempts to detect english abbreviations for %b and only if the string does not start with one of the months, tries the locale specific names. This is incorrect for some locales. For example in fr_FR %b for november is `nov.`. Parsing `nov. 29` as `%b %d` would fail because we wrongly assume that the month is just `nov` and not `nov.`. Then we attempt to parse `. 29` as ` %d`. The correct solution would be to try english and if later the string does not match to backtrack, but this does not match the existing flow of the code. Instead this restricts the fast path to matching full words to the english locale, no only prefixes. Fixes: tstack#1086
- Loading branch information