1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

fix: critical infinite loop at the date of switch to daylight saving time

This commit is contained in:
Ferdinand Mütsch
2022-01-02 13:17:30 +01:00
parent 6f9015d3d8
commit fd6c36832e
2 changed files with 4 additions and 4 deletions

View File

@ -292,9 +292,9 @@ func generateDays(from, to time.Time) []time.Time {
days := make([]time.Time, 0)
from = utils.StartOfDay(from)
to = utils.StartOfDay(to.Add(24 * time.Hour))
to = utils.StartOfDay(to.AddDate(0, 0, 1))
for d := from; d.Before(to); d = d.Add(24 * time.Hour) {
for d := from; d.Before(to); d = d.AddDate(0, 0, 1) {
days = append(days, d)
}