Skip to content
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

Parser interprets hyphen delimiter as timezone offset #1316

Open
rguptar opened this issue Oct 30, 2023 · 0 comments
Open

Parser interprets hyphen delimiter as timezone offset #1316

rguptar opened this issue Oct 30, 2023 · 0 comments

Comments

@rguptar
Copy link

rguptar commented Oct 30, 2023

from dateutil import parser
parser.parse("2023-01-01 01:01:01.000 - text") # raises exception
parser.parse("2023-01-01 01:01:01.000 -01:00") # succeeds
parser.parse("2023-01-01 01:01:01.000 - 01:00") # also raises an exception

The parser should stop when a space is encountered after the hyphen rather than raise an exception due to a missing timezone offset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant