Replies: 2 comments 1 reply
This comment has been hidden.
This comment has been hidden.
-
I'm strongly against the idea of a "deployment" timezone. It's extra config and an extra choice the admins have to make with no clear benefit. We already support computing the DAUs in arbitrary time zones (to 30min increments), and the most sensible default is the time zone of the person viewing the graph. We can add GUI options to compute plots in an explicitly chosen timezone, a la Grafana, Datadog, etc. in future if it becomes a highly requested feature for admins to be able to reproduce exactly the same plots. When it comes to displaying daily user totals by created_at --- this data is unambiguous in terms of the actual moment in time it represents, so again, we should be able to query daily totals in an arbitrary time zone, and on the UI should default to the viewer's time zone. Timestamps, when listed in things like logs, should always be in UTC. |
Beta Was this translation helpful? Give feedback.
-
Summary
This RFC proposes a standardized approach to managing timezone configurations across Coder deployments, including database interactions and user interfaces. The objective is to ensure a consistent timezone configuration that supports deployment-level and user-level needs without reliance on environment-specific settings that may vary across replicas and clusters.
Background
Currently, there is no deployment-wide or user-wide timezone configuration in Coder. Timestamps are typically stored in UTC, yet displayed timezones can differ across environments and users, resulting in inconsistent data views, particularly in metrics and insights. One example is the DAU graph, which gets different results based on the timezone of the user viewing it.
Goals
Proposed Solution
1. Database Timezone Consistency
timestamptz
in UTC.2. Deployment-Level Timezone Configuration
TZ
): Continue allowing theTZ
environment variable to set the initial deployment timezone, but enable a dedicated configuration within the Coder UI for transparency.3. User-Level Timezone Settings
4. Display Handling
5. UI Configuration and Management
TZ
environment variable.Open Questions
TZ
environment variable nor the UI configuration is available or valid?TZ
setting?Beta Was this translation helpful? Give feedback.
All reactions