diff --git a/code.py b/code.py index 50698db..51f29bb 100644 --- a/code.py +++ b/code.py @@ -28,6 +28,10 @@ def __init__(self): @staticmethod def to_datetime(as_str: str) -> adafruit_datetime.datetime: + # workaround for https://github.com/adafruit/Adafruit_CircuitPython_datetime/issues/22 + if as_str[-1] == "Z": + print(f"Warning: applying workaround for unsupported datetime format {as_str}") + as_str = as_str[:-1] + "-00:00" return adafruit_datetime.datetime.fromisoformat(as_str) def init_requests(self) -> None: