Yet another timezones fix
This commit is contained in:
@@ -55,9 +55,12 @@ async def command_set_time(app: PyroClient, message: Message):
|
||||
|
||||
break
|
||||
|
||||
now = datetime.now()
|
||||
|
||||
parsed_time = datetime.strptime(answer.text, "%H:%M").replace(
|
||||
year=1970, month=1, day=1, second=0, microsecond=0
|
||||
year=now.year, month=now.month, day=now.day, second=0, microsecond=0
|
||||
)
|
||||
|
||||
user_time = to_utc(parsed_time, user.location.timezone.zone)
|
||||
|
||||
await user.update_time(hour=user_time.hour, minute=user_time.minute)
|
||||
|
Reference in New Issue
Block a user