From 003d77624e8c352159712bb9b2ea9d5bf7080286 Mon Sep 17 00:00:00 2001 From: noah Date: Sun, 26 Dec 2021 10:07:58 +0900 Subject: [PATCH] Fix to truncate minute --- schedule.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/schedule.go b/schedule.go index 1bb45b4..58aeef0 100644 --- a/schedule.go +++ b/schedule.go @@ -94,7 +94,9 @@ L: } } - return t.In(origLoc) + return t. + Truncate(time.Minute). + In(origLoc) } // Next returns the previous time matched with the expression. @@ -180,7 +182,9 @@ L: } } - return t.In(origLoc) + return t. + Truncate(time.Minute). + In(origLoc) } // dayMatches returns true if the schedule's day-of-week and day-of-month