supabase / storage-py

Home Page:https://supabase-community.github.io/storage-py/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

datetime.fromisoformat Error

SiegAndy opened this issue · comments

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:

  1. Log in to the storage using the service role key
  2. Create any bucket
  3. Query created a bucket
  4. 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()))

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
commented

Fixed by #12