From ecc1b921e8f6e58ecec4c2bc01d1ada91f62343e Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Wed, 23 Jun 2021 12:56:33 +0200 Subject: [PATCH] fix not aware timezone --- ecomix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecomix.py b/ecomix.py index f211b12..e5ed84a 100644 --- a/ecomix.py +++ b/ecomix.py @@ -76,7 +76,7 @@ class Ecomix: @staticmethod def clean_cache(): - max_date = datetime.now() - timedelta(days=1) + max_date = datetime.utcnow().replace(tzinfo=UTC) - timedelta(days=1) for country in Ecomix._cache: Ecomix._cache[country][:] = [x for x in Ecomix._cache[country] if max_date < x[0]]