Skip to content

Commit 6e0edbd

Browse files
author
Noah Lee
authored
Fix to truncate minute (#2)
1 parent beac05d commit 6e0edbd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

schedule.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ L:
9494
}
9595
}
9696

97-
return t.In(origLoc)
97+
return t.
98+
Truncate(time.Minute).
99+
In(origLoc)
98100
}
99101

100102
// Next returns the previous time matched with the expression.
@@ -180,7 +182,9 @@ L:
180182
}
181183
}
182184

183-
return t.In(origLoc)
185+
return t.
186+
Truncate(time.Minute).
187+
In(origLoc)
184188
}
185189

186190
// dayMatches returns true if the schedule's day-of-week and day-of-month

0 commit comments

Comments
 (0)