Skip to content

fix(leaderboard): normalize timezone display using locale-aware Intl.DateTimeFormat (fixes #80) - #85

Closed
praveenchand-2005 wants to merge 1 commit into
SPaulse-Org:mainfrom
praveenchand-2005:fix-timezone-issue-80
Closed

fix(leaderboard): normalize timezone display using locale-aware Intl.DateTimeFormat (fixes #80)#85
praveenchand-2005 wants to merge 1 commit into
SPaulse-Org:mainfrom
praveenchand-2005:fix-timezone-issue-80

Conversation

@praveenchand-2005

Copy link
Copy Markdown

Fixes #80

Summary

Normalized leaderboard timestamps to the viewer's locale timezone using Intl.DateTimeFormat(navigator.language) instead of raw UTC strings.

Changes

  • formatDate() now defaults to navigator.language locale
  • formatTime() now defaults to navigator.language locale
  • timeAgo() now uses locale-aware Intl.RelativeTimeFormat
  • formatEventTime() uses toLocaleString(navigator.language) for consistency

All timestamps in leaderboard views will now display correctly in the user's local timezone.

Refactor multiple utility functions for better readability and consistency. Adjust formatting for XLM display, timestamp handling, and relative time calculations.
@praveenchand-2005

Copy link
Copy Markdown
Author

Superseded by #88 (cleaner rewrite with full test coverage and tsc-verified). Closing to avoid duplicate claims for #80.

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.

[wave] Fix inconsistent timezone display in leaderboard

1 participant