fix deprecation notice

This commit is contained in:
Mylloon 2024-11-17 15:04:31 +01:00
parent 608e85bc93
commit 68c2886ac0
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -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()