fix: tz not working
All checks were successful
ci/woodpecker/push/publish Pipeline was successful

This commit is contained in:
Mylloon 2023-12-24 18:30:01 +01:00
parent ea3655c9e7
commit 4c31c891fd
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -85,7 +85,9 @@ def exist_post(file_id: int) -> float | None:
def time_now() -> float:
"""get current time with timezone awareness"""
return datetime.now(timezone(session[Config._session_timezone])).timestamp()
return (
timezone(session[Config._session_timezone]).localize(datetime.now()).timestamp()
)
def create_post(file_id: int, content: str) -> bool: