UI: Show duration chart tooltips in the selected timezone - #72024
Draft
rjgoyln wants to merge 1 commit into
Draft
Conversation
The Last N Dag Runs / Task Instances chart formatted its bar labels in the browser's local timezone while the x-axis ticks and the rest of the UI follow the timezone picked in the header. Anyone whose machine sits in a different timezone read a tooltip timestamp that did not identify the run they were pointing at, which makes the chart misleading exactly when it is used to compare runs. Related: apache#72018
2 tasks
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
The duration chart on the Dag and Task overview pages formatted its bar labels — which Chart.js reuses as the tooltip title — in the browser's local timezone, while the x-axis ticks and every other timestamp in the UI follow the timezone selected in the header. A user in Warsaw looking at a run scheduled for 08:30 UTC saw the axis say 08:30 and the tooltip say 10:30, so the tooltip no longer identified the bar under the cursor — misleading precisely when the chart is used to compare runs.
Labels now go through the same
formatDatecall with the selected timezone that the axis already used.Tests
The component had no tests; this adds one asserting the label text across three timezones.
related: #72018
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5) following the guidelines