Attempt to work around timezones

This commit is contained in:
2023-09-24 23:47:09 +02:00
parent b0f76f4c49
commit 3fa2f5a800
13 changed files with 99 additions and 36 deletions

View File

@@ -5,6 +5,7 @@ from pyrogram.types import Message
from classes.pyroclient import PyroClient
from modules import custom_filters
from modules.utils import from_utc
@PyroClient.on_message(
@@ -21,7 +22,10 @@ async def command_toggle(app: PyroClient, message: Message):
)
return
user_time = datetime(1970, 1, 1, user.time_hour, user.time_minute).strftime("%H:%M")
user_time = from_utc(
datetime(1970, 1, 1, user.time_hour, user.time_minute),
None if user.location is None else user.location.timezone.zone,
).strftime(app._("time", "formats"))
if user.location is None:
await message.reply_text(