Title: `datetime.fromisoformat()` parses offset minutes outside 00-59 range · Issue #126883 · python/cpython · GitHub
Open Graph Title: `datetime.fromisoformat()` parses offset minutes outside 00-59 range · Issue #126883 · python/cpython
X Title: `datetime.fromisoformat()` parses offset minutes outside 00-59 range · Issue #126883 · python/cpython
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-5...
Open Graph 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: Val...
X 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))) exp...
Opengraph URL: https://github.com/python/cpython/issues/126883
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`datetime.fromisoformat()` parses offset minutes outside 00-59 range","articleBody":"# Bug report\n\n### Bug description:\n\n```python\n\u003e\u003e\u003e datetime.fromisoformat('2020-01-01T00:00+00:90')\ndatetime.datetime(2020, 1, 1, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=5400)))\n```\n\nexpected result: `ValueError` (90 minutes is out of range 00-59)\n\nI 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.\n\nWhat are your thoughts?\n\n### CPython versions tested on:\n\n3.13\n\n### Operating systems tested on:\n\nmacOS\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-127242\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/ariebovenberg","@type":"Person","name":"ariebovenberg"},"datePublished":"2024-11-15T19:53:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/126883/cpython/issues/126883"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2885a0a1-0407-0a0e-64c0-819a258473ba |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ACE0:3A6082:DA7100:119F6D7:696B0624 |
| html-safe-nonce | a3ee0d56a665325390e70bfa40865e63671da01d0ffcc86754b25ae932c24030 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQ0UwOjNBNjA4MjpEQTcxMDA6MTE5RjZENzo2OTZCMDYyNCIsInZpc2l0b3JfaWQiOiI2MzE5NzMyNDYwMTI3NzE2OTAwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7f557f09d4d8bd061cf5c7aea0c4f0f15513dd6ec8a65ffc2f22353e5708f07a |
| hovercard-subject-tag | issue:2662986593 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/126883/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1887ab3f1ecdee0ab36c08daec525728eae5f596936c9fde5453da031dbb1955/python/cpython/issues/126883 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1887ab3f1ecdee0ab36c08daec525728eae5f596936c9fde5453da031dbb1955/python/cpython/issues/126883 |
| og:image:alt | 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: Val... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ariebovenberg |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width