This commit is contained in:
Administrator 2022-10-23 02:18:50 +03:00
parent 6a69681e9f
commit 59be50706b

View File

@ -22,7 +22,7 @@ def get_next_daily_notify_time(user: User, time_now: datetime.datetime | None =
) )
print('now time is', time_now) print('now time is', time_now)
print('user wants to notify at', hours, minutes) 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') print('go to next day')
next_time = next_time + datetime.timedelta(days=1) next_time = next_time + datetime.timedelta(days=1)
return next_time return next_time