diff --git a/server/step_manager.go b/server/step_manager.go index 0224a99..5a8dcea 100644 --- a/server/step_manager.go +++ b/server/step_manager.go @@ -143,9 +143,9 @@ func (sm *StepManager) performSync(interval time.Duration) { totalSteps := 0 today := time.Now().Format("2006-01-02") - // Parse start date - start, _ := time.Parse("2006-01-02", tripStateCopy.StartDate) - end, _ := time.Parse("2006-01-02", today) + // Parse start date in local time + start, _ := time.ParseInLocation("2006-01-02", tripStateCopy.StartDate, time.Local) + end, _ := time.ParseInLocation("2006-01-02", today, time.Local) // Iterate from Start Date to Today for d := start; !d.After(end); d = d.AddDate(0, 0, 1) {