whoops rollover next day for minutes only
parent
b820714087
commit
5e84e801de
2
main.go
2
main.go
|
|
@ -52,7 +52,7 @@ func main() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
if hour < now.Hour() || min < now.Minute() {
|
if hour < now.Hour() || (hour == now.Hour() && min < now.Minute()) {
|
||||||
now = now.Add(time.Hour * 24)
|
now = now.Add(time.Hour * 24)
|
||||||
}
|
}
|
||||||
thenTime := time.Date(now.Year(), now.Month(), now.Day(), hour, min, 0, 0, now.Location())
|
thenTime := time.Date(now.Year(), now.Month(), now.Day(), hour, min, 0, 0, now.Location())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue