Skip to content

Fix chart X-axis timezone double-conversion#50

Merged
erikdarlingdata merged 1 commit intodevfrom
feature/49-chart-timezone-fix
Feb 15, 2026
Merged

Fix chart X-axis timezone double-conversion#50
erikdarlingdata merged 1 commit intodevfrom
feature/49-chart-timezone-fix

Conversation

@erikdarlingdata
Copy link
Owner

Summary

Fixes #49 — Custom date range chart X-axis was shifted by the server's UTC offset because fromDate/toDate (already in server time) had UtcOffsetMinutes added again.

  • Removed redundant .AddMinutes(UtcOffsetMinutes) from 4 chart range-setting blocks
  • Affects: wait stats, perfmon, blocking trend, deadlock trend charts

Test plan

  • dotnet build -c Debug — builds clean
  • Set custom range 08:00-12:00, verify X-axis shows 08:00-12:00 (not shifted)
  • Verify non-custom ranges (1h, 4h, etc.) still display correctly

🤖 Generated with Claude Code

The custom date range was already in server time (from LocalToServerTime),
but the chart axis limit code added UtcOffsetMinutes again, shifting the
X-axis by the server's UTC offset. With UTC-8 this caused an 8-hour shift
(e.g. picking 8 AM-12 PM showed 12 AM-4 AM on the axis).

Fixed in all 4 chart methods: blocking trend, deadlock trend, wait stats,
and perfmon.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 638b1ed into dev Feb 15, 2026
@erikdarlingdata erikdarlingdata deleted the feature/49-chart-timezone-fix branch February 20, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant