mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-09 05:47:30 +08:00
Fix: Timezone calculation in get_os_next_reset()
This commit is contained in:
parent
a3799675cb
commit
4d00a4829c
@ -415,7 +415,8 @@ def get_os_next_reset():
|
||||
"""
|
||||
d = datetime.now(timezone.utc).astimezone()
|
||||
diff = d.utcoffset() // timedelta(seconds=1) // 3600 - server_timezone()
|
||||
reset = (datetime.now().replace(day=1) + timedelta(days=32)) \
|
||||
now = datetime.now() - timedelta(hours=diff)
|
||||
reset = (now.replace(day=1) + timedelta(days=32)) \
|
||||
.replace(day=1, hour=0, minute=0, second=0, microsecond=0)
|
||||
reset += timedelta(hours=diff)
|
||||
return reset
|
||||
|
Loading…
Reference in New Issue
Block a user