datetime.fromisoformat Error
SiegAndy opened this issue · comments
T'aldarim commented
Describe the bug
At storage3/types.py, self.created_at and self.updated_at used datetime.fromisoformat to parse time format return by server bucket. But datetime is unable to parse microseconds which results in error: ValueError: Invalid isoformat string: '2022-07-06T18:15:22.53188+00:00'
.
To Reproduce
Steps to reproduce the behavior:
- Log in to the storage using the service role key
- Create any bucket
- Query created a bucket
- Error shows
Or you can just try this line:
result = datetime.fromisoformat(2022-07-06T18:15:22.53188+00:00)
Expected behavior
Expect it can correctly parse the time as datetime(2022, 7, 6, 18, 15, 22, 531880, tzinfo=tzutc()))
Desktop (please complete the following information):
- OS: Windows 10