replace math.Floor with math.Ceil
it's better to notify user at 18:00, not 17:59
This commit is contained in:
parent
ed99f4a16f
commit
5923f6bf3f
@ -83,7 +83,7 @@ func notifyAboutEvents(bc BotController) {
|
||||
events, _ := bc.GetAllEvents()
|
||||
for _, event := range events {
|
||||
delta := event.Date.Sub(time.Now())
|
||||
if int(math.Floor(delta.Minutes())) == 8*60 { // 8 hours
|
||||
if int(math.Ceil(delta.Minutes())) == 8*60 { // 8 hours
|
||||
reservations, _ := bc.GetReservationsByEventID(event.ID)
|
||||
for _, reservation := range reservations {
|
||||
uid := reservation.UserID
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user