Skip to content

Commit

Permalink
🩹 fsspec can return the time zone.
Browse files Browse the repository at this point in the history
  • Loading branch information
fbriol committed Sep 30, 2023
1 parent 7d6a024 commit 887103b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions zcollection/collection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 887103b

Please sign in to comment.