Skip to content

BUG: parsing ISO8601 string with format= and timezone name fails #49747

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

Merged

Conversation

MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli commented Nov 17, 2022

@MarcoGorelli MarcoGorelli changed the title BUG: %Y-%m-%d %H:%M:%S%Z goes down ISO fastpath, but ISO fastpath can't parse it BUG: parsing ISO8601 string with format= and timezone name fails Nov 17, 2022
@@ -1755,7 +1755,6 @@ def test_to_datetime_iso8601(self, cache, arg, exp_str):
("2012-01-01 10", "%Y-%m-%d %H:%M"),
("2012-01-01 10:00", "%Y-%m-%d %H:%M:%S"),
("2012-01-01 10:00:00", "%Y-%m-%d %H:%M:%S.%f"),
("2012-01-01 10:00:00.123", "%Y-%m-%d %H:%M:%S.%f%Z"),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one no longer goes down the ISO8601 fastpath, so removing it from here

@@ -284,10 +284,10 @@ def test_parse_time_string_check_instance_type_raise_exception():
("%Y%m%d %H:%M:%S", True),
("%Y-%m-%dT%H:%M:%S", True),
("%Y-%m-%dT%H:%M:%S%z", True),
("%Y-%m-%dT%H:%M:%S%Z", True),
("%Y-%m-%dT%H:%M:%S%Z", False),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are no longer detected as ISO because the pandas ISO8601 fastpath can't handle them

@MarcoGorelli MarcoGorelli added the Datetime Datetime data dtype label Nov 17, 2022
@mroeschke mroeschke added this to the 2.0 milestone Nov 17, 2022
@MarcoGorelli
Copy link
Member Author

thanks for reviewing!

@MarcoGorelli MarcoGorelli merged commit a37b78d into pandas-dev:main Nov 17, 2022
MarcoGorelli added a commit to MarcoGorelli/pandas that referenced this pull request Nov 18, 2022
…andas-dev#49747)

* %z -> %Z

* add whatsnew note and regression test

Co-authored-by: MarcoGorelli <>
mliu08 pushed a commit to mliu08/pandas that referenced this pull request Nov 27, 2022
…andas-dev#49747)

* %z -> %Z

* add whatsnew note and regression test

Co-authored-by: MarcoGorelli <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype
Projects
None yet
2 participants