Skip to content

Commit

Permalink
doh. fix extractdays multiplying by 48 hours instead of 24.
Browse files Browse the repository at this point in the history
  • Loading branch information
tedpearson committed Nov 6, 2022
1 parent 09638ca commit 6492117
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func Main() error {
// endDate should be the last minute of the day for the VictoriaMetrics query.
endDate = time.Date(year, month, day, 23, 59, 0, 0, time.Local)
// subtract N days and 1 minute to get the start date
startDate = endDate.Add(time.Duration(-config.ExtractDays) * 48 * time.Hour).Add(time.Minute)
startDate = endDate.Add(time.Duration(-config.ExtractDays) * 24 * time.Hour).Add(time.Minute)
}
log.Printf("Start date: %s\n", startDate)
log.Printf("End date: %s\n", endDate)
Expand Down

0 comments on commit 6492117

Please sign in to comment.