diff --git a/vault/logical_system_activity.go b/vault/logical_system_activity.go index 58ee0280a8b5..ece572d3000a 100644 --- a/vault/logical_system_activity.go +++ b/vault/logical_system_activity.go @@ -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() }