From 887103b4639cb2cb8bb017fb26609c037d14bdee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20BRIOL?= Date: Sat, 30 Sep 2023 12:18:31 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20fsspec=20can=20return=20the=20ti?= =?UTF-8?q?me=20zone.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zcollection/collection/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zcollection/collection/__init__.py b/zcollection/collection/__init__.py index b075c8a..e3fc5f3 100644 --- a/zcollection/collection/__init__.py +++ b/zcollection/collection/__init__.py @@ -419,6 +419,8 @@ def is_created_before(path: str, now: datetime.datetime, """Return whether the partition was created before the timedelta.""" created: datetime.datetime = self.fs.created(path) + if created.tzinfo is not None: + created = created.replace(tzinfo=None) return now - created > timedelta if timedelta is not None: