Skip to content

Commit

Permalink
avoid index error on whole second
Browse files Browse the repository at this point in the history
  • Loading branch information
martindurant committed Nov 19, 2024
1 parent 7e96e66 commit 3ed3b7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gcsfs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ def created(self, path):
def _parse_timestamp(self, timestamp):
assert timestamp.endswith("Z")
timestamp = timestamp[:-1]
timestamp = timestamp + "0" * (6 - len(timestamp.rsplit(".", 1)[1]))
timestamp = timestamp + "0" * (6 - len(timestamp.rsplit(".", 1)[-1]))
return datetime.fromisoformat(timestamp + "+00:00")

async def _info(self, path, generation=None, **kwargs):
Expand Down

0 comments on commit 3ed3b7a

Please sign in to comment.