From 5923f6bf3fa0fb0db932df55b282e239e4dfc132 Mon Sep 17 00:00:00 2001 From: Akulij Date: Sat, 29 Mar 2025 19:22:57 +0800 Subject: [PATCH] replace math.Floor with math.Ceil it's better to notify user at 18:00, not 17:59 --- cmd/app/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/app/main.go b/cmd/app/main.go index 4cd88df..416f486 100644 --- a/cmd/app/main.go +++ b/cmd/app/main.go @@ -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