next day
This commit is contained in:
parent
6a69681e9f
commit
59be50706b
@ -22,7 +22,7 @@ def get_next_daily_notify_time(user: User, time_now: datetime.datetime | None =
|
||||
)
|
||||
print('now time is', time_now)
|
||||
print('user wants to notify at', hours, minutes)
|
||||
if time_now.hour * 60 + time_now.minute < hours * 60 + minutes:
|
||||
if time_now.hour * 60 + time_now.minute > hours * 60 + minutes:
|
||||
print('go to next day')
|
||||
next_time = next_time + datetime.timedelta(days=1)
|
||||
return next_time
|
||||
|
Loading…
Reference in New Issue
Block a user