feat: timezone management#364
Conversation
- Added a new API endpoint for setting the user's timezone. - Introduced TimezoneProvider and useTimezone hook for managing timezone state. - Created TimezoneSettings component for users to select their preferred timezone. - Updated dashboard layout to include timezone context and settings. - Enhanced cookie management to store the user's timezone preference. This feature allows users to customize how time-related data is displayed in the dashboard.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Updated `useDateTimeState` to accept a timezone parameter for accurate date-time formatting. - Integrated timezone management into the TimePicker and TimePanel components. - Refactored date-time parsing and validation to utilize timezone-aware functions. - Improved user experience by ensuring all date-time inputs respect the selected timezone.
- Added functions to format dates and times based on the user's timezone. - Updated `formatAxisDate` and `formatHoveredValues` to accept a timezone parameter for accurate display. - Implemented new utility functions for handling zoned date formatting. - Created unit tests to verify timezone formatting functionality.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
… apply API Co-authored-by: Cursor <cursoragent@cursor.com>
…tetime joins Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5166b0d3c7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
- Removed direct imports of `formatDate`, `formatDateParts`, and `useTimezone` from the timezone module. - Updated imports to utilize the new formatting utilities from `@/lib/utils/formatting`. - Cleaned up the timezone settings and related components for better modularity and maintainability.
- Introduced a conditional button that allows users to select their browser's timezone if it differs from the currently selected timezone. - Enhanced accessibility by managing button visibility and interaction based on the browser timezone availability.
|
one comment, i think since we have unified settings for the timezone now, it would be nice if we can remove the timezone from the timestamps we are showing when visualizing data |
|
Hey 👋 Just a heads-up: in this PR, I fixed EN-1068 by standardizing the US date and time format to prevent issues across different locales. I didn’t change any timestamps or time zone logic. Just making sure we don’t reintroduce the bug. |



Ticket
Implements dashboard timezone preferences and applies the selected timezone consistently across timestamp display, monitoring, usage, and time-range selection.
formatDate,formatDateParts,formatDateRange,getRelativeDay) and removes duplicated one-off formatters