fix: set day range end to be one second before midnight.

i.e, the next day begins at 00:00.
pull/384/head
tjex 4 months ago
parent 55d5487d24
commit ad2f1d832a

@ -280,7 +280,9 @@ func parseDayRange(date string) (start time.Time, end time.Time, err error) {
return
}
start = startOfDay(day)
// we add -1 second so that the day range ends at 23:59:59
// i.e, the 'new day' begins at 00:00:00
start = startOfDay(day).Add(time.Second * -1)
end = start.AddDate(0, 0, 1)
return start, end, nil
}

Loading…
Cancel
Save