Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
skjdghsdjgsdj committed Sep 25, 2024
1 parent 2149011 commit 43c54d1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 43c54d1

Please sign in to comment.