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

Support more iso formats like python 11 #22

Open
Neradoc opened this issue Jan 5, 2023 · 0 comments
Open

Support more iso formats like python 11 #22

Neradoc opened this issue Jan 5, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Neradoc
Copy link
Contributor

Neradoc commented Jan 5, 2023

This library:

>>> from adafruit_datetime import datetime
>>> datetime.fromisoformat('2000-01-01T00:30:27Z')
Traceback (most recent call last):
  File "adafruit_datetime.py", line 1019, in fromisoformat
  File "adafruit_datetime.py", line 985, in _parse_iso_string
ValueError: 

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "adafruit_datetime.py", line 1386, in fromisoformat
  File "adafruit_datetime.py", line 1027, in fromisoformat
ValueError: Invalid isoformat string: '00:30:27Z'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "adafruit_datetime.py", line 1391, in fromisoformat
ValueError: Invalid isoformat string: '2000-01-01T00:30:27Z'
>>> 

Python 11:

python
Python 3.11.1 (main, Jan  5 2023, 23:03:26) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> datetime.fromisoformat("2022-01-01T00:01:00Z")
datetime.datetime(2022, 1, 1, 0, 1, tzinfo=datetime.timezone.utc)
>>>
@Neradoc Neradoc added the enhancement New feature or request label Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant