fix: accumulate agentstats until reported and fix insights DAU offset (#15832)

This commit is contained in:
Mathias Fredriksson
2024-12-18 11:26:38 +02:00
committed by GitHub
parent 77dc510a45
commit 4c5b737368
4 changed files with 50 additions and 12 deletions

View File

@ -89,7 +89,7 @@ func (api *API) returnDAUsInternal(rw http.ResponseWriter, r *http.Request, temp
}
for _, row := range rows {
resp.Entries = append(resp.Entries, codersdk.DAUEntry{
Date: row.StartTime.Format(time.DateOnly),
Date: row.StartTime.In(loc).Format(time.DateOnly),
Amount: int(row.ActiveUsers),
})
}