From bc6b871b6c3b4ade90b46d96c8b1908b90830b9c Mon Sep 17 00:00:00 2001 From: yuuki <> Date: Wed, 14 Aug 2024 18:43:02 +0900 Subject: [PATCH] =?UTF-8?q?=E7=B4=B0=E3=81=8B=E3=81=84=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index c8fe313..ad82774 100644 --- a/app.py +++ b/app.py @@ -40,8 +40,8 @@ def content_to_linksets(content: str) -> str: return "\n".join(groups) def is_over_n_hours(src: datetime, hours: int) -> bool: - now = datetime.now().astimezone(timezone.utc) - return now - src >= timedelta(hours=hours) + now = datetime.now() + return now - src.replace(tzinfo=None) > timedelta(hours=hours) # 初期化