From 852a30229d463569290b4809da39a53b6417292a Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 24 Dec 2023 18:40:35 +0100 Subject: [PATCH] Revert "fix: tz not working" This reverts commit 4c31c891fda1dfe552ad45e99c6bb3caeca336fe. --- src/utils/misc.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/utils/misc.py b/src/utils/misc.py index 5fda0e8..a38db4c 100644 --- a/src/utils/misc.py +++ b/src/utils/misc.py @@ -85,9 +85,7 @@ def exist_post(file_id: int) -> float | None: def time_now() -> float: """get current time with timezone awareness""" - return ( - timezone(session[Config._session_timezone]).localize(datetime.now()).timestamp() - ) + return datetime.now(timezone(session[Config._session_timezone])).timestamp() def create_post(file_id: int, content: str) -> bool: