From 3ed3b7a55c17e1ef6adb0fb879984621516397af Mon Sep 17 00:00:00 2001 From: Martin Durant Date: Tue, 19 Nov 2024 17:30:44 -0500 Subject: [PATCH] avoid index error on whole second --- gcsfs/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcsfs/core.py b/gcsfs/core.py index 6ae4c60c..7decb734 100644 --- a/gcsfs/core.py +++ b/gcsfs/core.py @@ -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):