René's URL Explorer Experiment


Title: datetime.fromisoformat() accepts invalid ISO 8601 timestamps · Issue #115783 · python/cpython · GitHub

Open Graph Title: datetime.fromisoformat() accepts invalid ISO 8601 timestamps · Issue #115783 · python/cpython

X Title: datetime.fromisoformat() accepts invalid ISO 8601 timestamps · Issue #115783 · python/cpython

Description: Bug report Bug description: Since Python 3.11, datetime.fromisoformat(...) accepts invalid timestamps. The same code was tested in many Python versions via GitHub Actions: Wrong format: 2024-01-17T15:21:00-0800 Fixed format: 2024-01-17T1...

Open Graph Description: Bug report Bug description: Since Python 3.11, datetime.fromisoformat(...) accepts invalid timestamps. The same code was tested in many Python versions via GitHub Actions: Wrong format: 2024-01-17T...

X Description: Bug report Bug description: Since Python 3.11, datetime.fromisoformat(...) accepts invalid timestamps. The same code was tested in many Python versions via GitHub Actions: Wrong format: 2024-01-17T...

Opengraph URL: https://github.com/python/cpython/issues/115783

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"datetime.fromisoformat() accepts invalid ISO 8601 timestamps","articleBody":"# Bug report\r\n\r\n### Bug description:\r\n\r\nSince Python 3.11, `datetime.fromisoformat(...)` accepts invalid timestamps. The same code was tested in many Python versions via GitHub Actions:\r\n\r\nWrong format: `2024-01-17T15:21:00-0800`  \r\nFixed format: `2024-01-17T15:21:00-08:00`\r\n\r\nPython code to check:\r\n```python\r\ndatetime.fromisoformat(\"2024-01-17T15:21:00-0800\")\r\n```\r\n\r\nISO 8601 defines 2 formats:\r\n* **basic** format (in short: without separators) and\r\n* **extended** format (with separators).\r\n\r\nWhen checking the EBNF rules, all parts of the timestamp must be with or without separators. A mix of formats is not allowed.\r\n\r\nI haven't checked for other basic and extended format mixes.  \r\nMy CI checked many Python versions and platforms. Here a failed CI pipeline, shows a correct implementation. A successful pipeline denotes a buggy Python version.  \r\n![image](https://github.com/python/cpython/assets/956109/9c732f67-cf3d-48fd-8638-8a9bccfdf7c7)\r\n\r\n\r\nOther resources:\r\n* #75981\r\n* #86537\r\n* #107779\r\n  * #107791\r\n* https://github.com/dateutil/dateutil/issues/1341\r\n* https://github.com/adlnet/xAPI-Spec/issues/541\r\n* https://github.com/bitwalker/timex/issues/98\r\n* ISO 8601 - https://web.archive.org/web/20171019211402/https://www.loc.gov/standards/datetime/ISO_DIS%208601-1.pdf\r\n\r\n### CPython versions tested on:\r\n\r\n3.8, 3.9, 3.10, 3.11, 3.12, 3.13\r\n\r\n### Operating systems tested on:\r\n\r\nLinux, macOS, Windows\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-131522\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/Paebbels","@type":"Person","name":"Paebbels"},"datePublished":"2024-02-21T21:05:28Z","url":"https://github.com/python/cpython/issues/115783"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:be1ea7de-6a07-4c81-6425-8b7768f2fdf3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8846:380435:4EAC06:633E9B:6B0202AA
html-safe-noncebaf86d3138998cf28b15d5a67ac1a3d533334b0c5e2bf0b739e37f87ac0ee0fb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODQ2OjM4MDQzNTo0RUFDMDY6NjMzRTlCOjZCMDIwMkFBIiwidmlzaXRvcl9pZCI6IjQ2MDM0NTMyMTIxNjEzNDQxNzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaccc7605e59065a6d0171ac16df5422592592866265bc66084db4be25c76ecd674
hovercard-subject-tagissue:2147712024
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/115783/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f6995b41de23eb0bff8c5c2ce47fc43724d29e9f452f6cd77a0e63e80b95e2a3/python/cpython/issues/115783
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f6995b41de23eb0bff8c5c2ce47fc43724d29e9f452f6cd77a0e63e80b95e2a3/python/cpython/issues/115783
og:image:altBug report Bug description: Since Python 3.11, datetime.fromisoformat(...) accepts invalid timestamps. The same code was tested in many Python versions via GitHub Actions: Wrong format: 2024-01-17T...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamePaebbels
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/115783#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F115783
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F115783
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/115783
Reloadhttps://github.com/python/cpython/issues/115783
Reloadhttps://github.com/python/cpython/issues/115783
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/115783
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/115783
datetime.fromisoformat() accepts invalid ISO 8601 timestampshttps://github.com/python/cpython/issues/115783#top
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/Paebbels
Paebbelshttps://github.com/Paebbels
on Feb 21, 2024https://github.com/python/cpython/issues/115783#issue-2147712024
https://private-user-images.githubusercontent.com/956109/306774156-9c732f67-cf3d-48fd-8638-8a9bccfdf7c7.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTUyOTQxNjYsIm5iZiI6MTc5NTI5Mzg2NiwicGF0aCI6Ii85NTYxMDkvMzA2Nzc0MTU2LTljNzMyZjY3LWNmM2QtNDhmZC04NjM4LThhOWJjY2ZkZjdjNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYxMTIxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MTEyMVQyMDQ0MjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yM2JmMzk0YTQ1ZDMxNzRmOTkxYjkyNzhkY2NjZDFhODMwZDU5OGI2ZjZlMzcwMjk5MDkyZDNhY2FhYzk1MDA2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.GujBfVZaq03zdxzbso-3SB_74GLWXO8_rjta_BLnB2Q
datetime.strptime: Support for parsing offsets with a colon #75981https://github.com/python/cpython/issues/75981
datetime.fromisoformat(): Omitted colon in timezone suffix raises ValueError #86537https://github.com/python/cpython/issues/86537
datetime.fromisoformat incorrectly accepts and parses strings without date-time separator #107779https://github.com/python/cpython/issues/107779
gh-107779: Check for the separator between date and time in datetime.datetime.fromisoformat #107791https://github.com/python/cpython/pull/107791
parser.isoparse() accepts invalid ISO 8601 timestamps dateutil/dateutil#1341https://github.com/dateutil/dateutil/issues/1341
ISO 8601 timestamps - basic/extended format mixing adlnet/xAPI-Spec#541https://github.com/adlnet/xAPI-Spec/issues/541
ISO8601 - Mixed Basic and Extended format bitwalker/timex#98https://github.com/bitwalker/timex/issues/98
https://web.archive.org/web/20171019211402/https://www.loc.gov/standards/datetime/ISO_DIS%208601-1.pdfhttps://web.archive.org/web/20171019211402/https://www.loc.gov/standards/datetime/ISO_DIS%208601-1.pdf
gh-115783: Deprecate support for invalid ISO formats in datetime.fromisoformat #131522https://github.com/python/cpython/pull/131522
Paebbelshttps://github.com/Paebbels
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
on Feb 21, 2024https://github.com/python/cpython/issues/115783#event-11882310807
serhiy-storchakahttps://github.com/serhiy-storchaka
Date and time issues 🕰️https://github.com/orgs/python/projects/21
on Feb 21, 2024https://github.com/python/cpython/issues/115783#event-14885896663
https://github.com/skoehler
skoehlerhttps://github.com/skoehler
on Feb 23, 2024https://github.com/python/cpython/issues/115783#issuecomment-1961751554
https://github.com/TooPercentMilk
TooPercentMilkhttps://github.com/TooPercentMilk
on Apr 3, 2024https://github.com/python/cpython/issues/115783#issuecomment-2035090192
https://github.com/maxcyd
maxcydhttps://github.com/maxcyd
on Apr 26, 2024https://github.com/python/cpython/issues/115783#issuecomment-2079616060
https://github.com/StanFromIreland
StanFromIrelandhttps://github.com/StanFromIreland
on Mar 18, 2025https://github.com/python/cpython/issues/115783#issuecomment-2734403669
cpython/Lib/test/datetimetester.pyhttps://github.com/python/cpython/blob/e82c2ca2a59235bc1965b259f4421635861e0470/Lib/test/datetimetester.py#L3394-L3394
e82c2cahttps://github.com/python/cpython/commit/e82c2ca2a59235bc1965b259f4421635861e0470
cpython/Lib/test/datetimetester.pyhttps://github.com/python/cpython/blob/e82c2ca2a59235bc1965b259f4421635861e0470/Lib/test/datetimetester.py#L3396-L3396
e82c2cahttps://github.com/python/cpython/commit/e82c2ca2a59235bc1965b259f4421635861e0470
cpython/Lib/test/datetimetester.pyhttps://github.com/python/cpython/blob/e82c2ca2a59235bc1965b259f4421635861e0470/Lib/test/datetimetester.py#L3481-L3481
e82c2cahttps://github.com/python/cpython/commit/e82c2ca2a59235bc1965b259f4421635861e0470
cpython/Lib/test/datetimetester.pyhttps://github.com/python/cpython/blob/e82c2ca2a59235bc1965b259f4421635861e0470/Lib/test/datetimetester.py#L3484-L3484
e82c2cahttps://github.com/python/cpython/commit/e82c2ca2a59235bc1965b259f4421635861e0470
cpython/Lib/test/datetimetester.pyhttps://github.com/python/cpython/blob/e82c2ca2a59235bc1965b259f4421635861e0470/Lib/test/datetimetester.py#L3487-L3487
e82c2cahttps://github.com/python/cpython/commit/e82c2ca2a59235bc1965b259f4421635861e0470
cpython/Lib/test/datetimetester.pyhttps://github.com/python/cpython/blob/e82c2ca2a59235bc1965b259f4421635861e0470/Lib/test/datetimetester.py#L3497-L3497
e82c2cahttps://github.com/python/cpython/commit/e82c2ca2a59235bc1965b259f4421635861e0470
cpython/Lib/test/datetimetester.pyhttps://github.com/python/cpython/blob/e82c2ca2a59235bc1965b259f4421635861e0470/Lib/test/datetimetester.py#L3501-L3501
e82c2cahttps://github.com/python/cpython/commit/e82c2ca2a59235bc1965b259f4421635861e0470
cpython/Lib/test/datetimetester.pyhttps://github.com/python/cpython/blob/e82c2ca2a59235bc1965b259f4421635861e0470/Lib/test/datetimetester.py#L3505-L3505
e82c2cahttps://github.com/python/cpython/commit/e82c2ca2a59235bc1965b259f4421635861e0470
cpython/Lib/test/datetimetester.pyhttps://github.com/python/cpython/blob/e82c2ca2a59235bc1965b259f4421635861e0470/Lib/test/datetimetester.py#L3507-L3507
e82c2cahttps://github.com/python/cpython/commit/e82c2ca2a59235bc1965b259f4421635861e0470
@pgansslehttps://github.com/pganssle
picnixzhttps://github.com/picnixz
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
on Mar 18, 2025https://github.com/python/cpython/issues/115783#event-16843367549
https://github.com/pganssle
pgansslehttps://github.com/pganssle
on Mar 18, 2025https://github.com/python/cpython/issues/115783#issuecomment-2734827677
https://github.com/StanFromIreland
StanFromIrelandhttps://github.com/StanFromIreland
on Mar 19, 2025https://github.com/python/cpython/issues/115783#issuecomment-2737686788
https://github.com/ariebovenberg
ariebovenberghttps://github.com/ariebovenberg
on Apr 11, 2025https://github.com/python/cpython/issues/115783#issuecomment-2796813411
tc39/proposal-temporal#2601https://github.com/tc39/proposal-temporal/issues/2601
https://github.com/Paebbels
Paebbelshttps://github.com/Paebbels
on Apr 11, 2025https://github.com/python/cpython/issues/115783#issuecomment-2797823116
@ariebovenberghttps://github.com/ariebovenberg
tc39/proposal-temporal#2601 (comment)https://github.com/tc39/proposal-temporal/issues/2601#issuecomment-1589770662
https://github.com/Paebbels
Paebbelshttps://github.com/Paebbels
on Sep 25, 2025https://github.com/python/cpython/issues/115783#issuecomment-3333230838
https://www.utctime.net/https://www.utctime.net/
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/115783
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/115783
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
Date and time issues 🕰️https://github.com/orgs/python/projects/21
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.