From 68c2886ac00335739096ec38e08f7f2c6bfb95d9 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 17 Nov 2024 15:04:31 +0100 Subject: [PATCH] fix deprecation notice --- src/utils/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/misc.py b/src/utils/misc.py index 123568b..c105d3e 100644 --- a/src/utils/misc.py +++ b/src/utils/misc.py @@ -93,7 +93,7 @@ def exist_post(file_id: int) -> float | None: def time_now() -> float: """get current time based on timezone""" - now = datetime.utcnow() + now = datetime.now(datetime.timezone.utc) return ( now.timestamp() + timezone(session[Config._session_timezone]).utcoffset(now).total_seconds()