feat: Fix Deployment DAUs to work with local timezones (#7647)

* chore: Add timezone param to DAU SQL query
* Merge DAUs response
* Pass time offsets to metricscache
This commit is contained in:
Steven Masley
2023-05-30 19:18:27 +02:00
committed by GitHub
parent 68658b5197
commit c795a0e500
29 changed files with 606 additions and 310 deletions

View File

@ -24,7 +24,7 @@ VALUES
-- name: GetTemplateDAUs :many
SELECT
(created_at at TIME ZONE 'UTC')::date as date,
(created_at at TIME ZONE cast(@tz_offset::integer as text))::date as date,
user_id
FROM
workspace_agent_stats
@ -38,7 +38,7 @@ ORDER BY
-- name: GetDeploymentDAUs :many
SELECT
(created_at at TIME ZONE 'UTC')::date as date,
(created_at at TIME ZONE cast(@tz_offset::integer as text))::date as date,
user_id
FROM
workspace_agent_stats