Archived
1
0
Fork 0
This commit is contained in:
多羅狼 2023-12-10 01:46:39 +08:00 committed by GitHub
parent 86eaf18cb1
commit b8206af0d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -204,9 +204,9 @@ async def _(msg: Bot.MessageSession, offset: str):
hour = tstr_split[0]
minute = tstr_split[1] if len(tstr_split) > 1 else 0
if minute == 0:
offset = f"{'+' if hours >= 0 else '-'}{abs(hour)}"
offset = f"{'+' if hour >= 0 else '-'}{abs(hour)}"
else:
offset = f"{'+' if hours >= 0 else '-'}{abs(hour)}:{abs(minute):02d}"
offset = f"{'+' if hour >= 0 else '-'}{abs(hour)}:{abs(minute):02d}"
if hour > 12 or minute > 60:
raise ValueError
except ValueError: