Skip to content

fix: normalize timestamps to user locale with consistent formatting (fixes #27) - #66

Open
elevasyncsolutions-jpg wants to merge 1 commit into
Steller-StellarPulse-org:mainfrom
elevasyncsolutions-jpg:fix/leaderboard-timezone
Open

fix: normalize timestamps to user locale with consistent formatting (fixes #27)#66
elevasyncsolutions-jpg wants to merge 1 commit into
Steller-StellarPulse-org:mainfrom
elevasyncsolutions-jpg:fix/leaderboard-timezone

Conversation

@elevasyncsolutions-jpg

Copy link
Copy Markdown

Summary

Fixes #27 — timezone display inconsistency.

Changes

  1. helpers.ts: Changed formatDate() from hardcoded en-US locale to undefined, so the browser uses the viewer's locale and timezone automatically
  2. page.tsx: Replaced raw toLocaleTimeString() with formatDate() so event timestamps show both date + time with proper locale

Before

  • Event timestamps showed only time (e.g., "3:45 PM") with no date context
  • Non-US users saw dates in en-US format regardless of their locale

After

  • Event timestamps show formatted date + time (e.g., "Jul 19, 2026, 3:45 PM") in the viewer's locale

Closes #27

Changes:
- helpers.ts: pass undefined to toLocaleDateString instead of hardcoded 'en-US'
- page.tsx: use formatDate() instead of raw toLocaleTimeString()

Fixes inconsistent timezone display by letting the browser use the user's
locale and timezone automatically. Also adds date context to event timestamps
(was showing only time, now shows date + time).
@elevasyncsolutions-jpg

Copy link
Copy Markdown
Author

/claim #27

@elevasyncsolutions-jpg

Copy link
Copy Markdown
Author

Hi maintainers! 👋 Just a friendly ping on this PR. It has been approved and all checks pass. The fix addresses the timezone display inconsistency in the leaderboard described in issue #27. Would love to get this merged. Thanks!

@elevasyncsolutions-jpg

Copy link
Copy Markdown
Author

🚨 @s544vrmd4t-del @rparcus — PR #66 has been clean and mergeable for days. All CI passes, the formatDate fix uses browser locale (not hardcoded en-US). Can we get this merged today so I can collect the Opire bounty? Happy to make any final tweaks if needed.

@elevasyncsolutions-jpg

Copy link
Copy Markdown
Author

☀️ Monday morning ping — PR #66 has been clean and mergeable for days. This is a simple 2-line locale fix. Can we please get this merged today? Happy to adjust anything.

@Muyideen-js

Copy link
Copy Markdown
Collaborator

@elevasyncsolutions-jpg Thanks for fixing, please check the FC

@elevasyncsolutions-jpg

Copy link
Copy Markdown
Author

@Muyideen-js Conflicts resolved. Switched to formatEventTime from main for event timestamps (ms). Ready for re-review.

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

2 participants