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

add compatibility for removing leading-zeros in strftime/strptime #703



Copy link

The datetime format specifier for datetime.strftime allows to remove leading zeros from outputted data. However, attempting to use the same format string with datetime.strptime raises with ValueError: '-' is a bad directive in format '%-m/%-d/%Y %-I:%M %p %z'. This PR fixes the issue.

@azmeuk azmeuk merged commit 2fc14e5 into wtforms:master Sep 12, 2021
Copy link

azmeuk commented Sep 12, 2021

Thank you for your contribution!

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

Successfully merging this pull request may close these issues.

None yet

2 participants