Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Closed
Description
Bug report
Bug description:
>>>datetime.fromisoformat('2020-01-01T00:00+00:90')datetime.datetime(2020,1,1,0,0,tzinfo=datetime.timezone(datetime.timedelta(seconds=5400)))
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
Metadata
Metadata
Assignees
Labels
Projects
Status
Done