mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user