From 635352edbd4532bccf1e611fc99eeecf75fff66e Mon Sep 17 00:00:00 2001 From: Samuel Pua Date: Sun, 2 Oct 2022 00:14:11 +0800 Subject: [PATCH] Fix(booking-job): Fix start time --- backend/internal/ktmtrainbot/backgroundbookingjob.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/internal/ktmtrainbot/backgroundbookingjob.go b/backend/internal/ktmtrainbot/backgroundbookingjob.go index e073ca1..bd4ffa0 100644 --- a/backend/internal/ktmtrainbot/backgroundbookingjob.go +++ b/backend/internal/ktmtrainbot/backgroundbookingjob.go @@ -77,7 +77,7 @@ func (env *Env) BackgroundJobRunner() { } else { // if there's job to do // Create next run where it's not the past (either from old NextRun or now()) timeNow := time.Now() - startTime := time.Date(timeNow.Year(), timeNow.Month(), timeNow.Day(), 23, 07, 0, 0, timeNow.Location()) + startTime := time.Date(timeNow.Year(), timeNow.Month(), timeNow.Day(), 0, 10, 0, 0, timeNow.Location()) endTime := startTime.Add(10 * time.Minute) if timeNow.After(startTime) && timeNow.Before(endTime) {