Skip to content

fix: BurnChart tooltip dates off by one in western timezones#16

Open
sb777 wants to merge 1 commit into
metrom-xyz:mainfrom
sb777:fix/burnchart-tooltip-timezone
Open

fix: BurnChart tooltip dates off by one in western timezones#16
sb777 wants to merge 1 commit into
metrom-xyz:mainfrom
sb777:fix/burnchart-tooltip-timezone

Conversation

@sb777
Copy link
Copy Markdown

@sb777 sb777 commented Apr 8, 2026

Summary

  • new Date("2026-04-06") parses as UTC midnight per spec, but toLocaleDateString() without a timeZone option renders in the browser's local timezone. In any UTC-negative timezone (all of the Americas), the tooltip date rolls back one day.
  • This makes the BurnChart and UnvestingChart appear to show different data for the same date, when in reality it's the same data with mismatched labels.
  • Fix: add timeZone: 'UTC' to the toLocaleDateString call in the BurnChart tooltip, matching the server-side displayDate computation.

new Date("2026-04-06") parses as UTC midnight, but toLocaleDateString
renders in the browser's local timezone. In US timezones this rolls the
displayed date back one day, making the BurnChart tooltip show "Apr 5"
for data that the UnvestingChart correctly labels "Apr 6".

Add timeZone: 'UTC' to keep the tooltip consistent with the server-
computed displayDate used everywhere else.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 8, 2026

⚠️ No Changeset found

Latest commit: a3043a2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 8, 2026

@sb777 is attempting to deploy a commit to the 0xvenky's projects Team on Vercel.

A member of the Team first needs to authorize it.

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