-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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.fromisoformat()
parses offset minutes outside 00-59 range
#126883
Comments
I understand that the solution to this problem still requires discussion, as it may break backward compatibility. But I decided to save some information about this module here for now.
The We have function to check input time data: Inside the So we can start checking time fields inside And if no one has revivals, I'd like to implement patch. |
I have a suggestion to call
|
@donBarbos we'd have to think of something else. |
@ariebovenberg sorry for my inattention but we need to look at the C implementation to solve this problem. And the one in Regarding where to check time fields, I completely agree with you, as it is more logical. |
Bug report
Bug description:
expected result:
ValueError
(90 minutes is out of range 00-59)I wasn't able to find a definitive paragraph of the ISO8601 to quote (it's not an open standard), but it appears datetime libraries in other languages (Temporal, NodaTime) do enforce this. Also, RFC3339 does explicitly forbid offset minutes outside the 00-59 range.
What are your thoughts?
CPython versions tested on:
3.13
Operating systems tested on:
macOS
Linked PRs
datetime.fromisoformat
#127242The text was updated successfully, but these errors were encountered: