Skip to content

Plotly JS charts now consider timezones#2031

Merged
aestoltm merged 5 commits intoubccr:mainfrom
aestoltm:fix_plotly_timezone
Apr 24, 2025
Merged

Plotly JS charts now consider timezones#2031
aestoltm merged 5 commits intoubccr:mainfrom
aestoltm:fix_plotly_timezone

Conversation

@aestoltm
Copy link
Copy Markdown
Contributor

@aestoltm aestoltm commented Apr 23, 2025

Description

Should have been in original conversion (PR #1822). This update makes all XDMoD charts timezone aware. Plotly JS does not support timezones. Therefore, moment js was utilized to convert the dates to the web server's timezone.

This bug was found by @ryanrath and Shava. The the following chart, exposes the bug for 'America/Los_Angeles' vs 'America/New_York' timezones.

Note: Job Viewer charts were already timezone aware because they are created through a separate mechanism than all other XDMoD charts.

Motivation and Context

Wrong date range shown on the plot depending on the data time range and client's timezone.

Tests performed

Tested the chart linked across various timezones. (See here for more details on changing timezone)

Checklist:

  • The pull request description is suitable for a Changelog entry
  • The milestone is set correctly on the pull request
  • The appropriate labels have been added to the pull request

@aestoltm aestoltm added bug Bugfixes Category:Metric Explorer Metric Explorer / Usage labels Apr 23, 2025
@aestoltm aestoltm added this to the 11.5.0 milestone Apr 23, 2025
@aestoltm aestoltm requested a review from ryanrath April 23, 2025 19:02
ryanrath
ryanrath previously approved these changes Apr 23, 2025
@aestoltm aestoltm changed the title Plolty JS charts now consider timezones Plotly JS charts now consider timezones Apr 23, 2025
@aestoltm aestoltm requested a review from ryanrath April 24, 2025 14:21
@aestoltm aestoltm merged commit a7ab963 into ubccr:main Apr 24, 2025
4 checks passed
@aestoltm aestoltm deleted the fix_plotly_timezone branch April 24, 2025 14:47
aaronweeden pushed a commit to aaronweeden/xdmod that referenced this pull request May 23, 2025
* Added timezone conversion to Plotly JS charts. Should have been included in original conversion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bugfixes Category:Metric Explorer Metric Explorer / Usage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants