fix: restore consistent local-time display - #73
Conversation
|
/claim #27 PR #73 repairs the merge-conflict fallout in current Verified on commit
|
|
@Muyideen-js Could you please review this consolidation before merging another timezone attempt? Current Validation on |
Remove duplicate formatDate/formatTime/timeAgo definitions. All timestamp functions now consistently use Intl.DateTimeFormat with viewer locale+timezone. Fix explorerUrl merge corruption. Clean up markets page duplicate imports. Closes SPaulse-Org#70, SPaulse-Org#73
|
I'll review the timestamp normalization logic and consolidate the conflicting helpers into a single path that consistently handles both seconds and milliseconds. Additionally, I'll verify the locale rendering and timezone label display for market events and leaderboard refresh times. /opire try |
Summary
Root cause
Several overlapping fixes for the earlier timezone issue were merged into the same files. That left duplicate declarations, mixed seconds/milliseconds assumptions, duplicated UI, and syntactically invalid tests. The frontend could no longer compile, and different views formatted the same instant through incompatible code paths.
Impact
Every affected view now uses the same timestamp contract. Users see consistent local times with timezone context, malformed or out-of-range timestamps are discarded instead of being displayed incorrectly, relative past/future times behave consistently, and the leaderboard reports its last successful onchain refresh without inventing a client-only timestamp.
Validation
npm test— 13 files, 191 tests passednpm run build— production build passednpx tsc --noEmit— passedgit diff --check— passedTracking
Fixes #70.
The Opire reward remains attached to the original report in #27; this PR is registered against that reward through Opire's dashboard.
/claim #27