Make metrics and generic IDB viewers respect timezone preferences - #348
Open
sankalpsthakur wants to merge 1 commit into
Open
Make metrics and generic IDB viewers respect timezone preferences#348sankalpsthakur wants to merge 1 commit into
sankalpsthakur wants to merge 1 commit into
Conversation
Completes remaining work from inductiveautomation#300 on top of the General timezone preference introduced in inductiveautomation#321: - Format Date cells in ReifiedJXTable via Timezone.Default (covers generic IDB and QuestDB results tables) and repaint on change - Instantiate generic IDB "tsmp" columns as Timestamp so full time-of-day is preserved when formatting in the preferred zone - Show an updating Timezone label on the metrics view - Align sparkline DateAxis timezone with the preference Fixes inductiveautomation#300
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #300 by finishing timezone-preference support for the metrics and generic IDB viewers (on top of the global preference from #321).
Changes
ReifiedJXTable): Date columns are formatted withTimezone.Defaultinstead of a system-defaultSimpleDateFormat, and tables repaint when the preference changes. This also covers QuestDB result tables that share the same renderer.GenericView): Columns whose names containtsmpare now instantiated asjava.sql.Timestamp(notjava.sql.Date) so full time-of-day is preserved when formatting in the preferred zone.MetricsView): Adds a liveTimezone: <zone-id>label above the metric cards so it's clear which zone is in use.Sparkline): DomainDateAxistimezone tracks the preference (tooltips already did).How tested
./gradlew compileKotlin test— BUILD SUCCESSFUL (existing tests pass)./gradlew spotlessCheck— BUILD SUCCESSFULAI disclosure
This contribution was developed with assistance from an AI coding agent (Grok/Cursor). Changes were reviewed and validated by running the project's Gradle compile, test, and Spotless checks.