fix end date calculation (#11232)
This commit is contained in:
parent
8898f84a1e
commit
532093d065
|
@ -109,7 +109,7 @@ func (b *SystemBackend) handleClientMetricQuery(ctx context.Context, req *logica
|
|||
// Also convert any user inputs to UTC to avoid
|
||||
// problems later.
|
||||
if endTime.IsZero() {
|
||||
endTime = timeutil.EndOfMonth(time.Now().UTC().AddDate(0, -1, 0))
|
||||
endTime = timeutil.EndOfMonth(timeutil.StartOfPreviousMonth(time.Now().UTC()))
|
||||
} else {
|
||||
endTime = endTime.UTC()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue