Skip to content

Timezone-Aware Relative Timestamp Display #511

Description

@Kingsman-99

Description

All timestamps in the app are displayed as UTC ISO strings that users must mentally convert to their local time, making it difficult to gauge how recent activity is or when a deadline falls. A consistent relative timestamp display using the user's local timezone must be applied globally.

Technical Context

src/components/ui/RelativeTime.tsx (new) wraps the Intl.RelativeTimeFormat API to render strings like "3 minutes ago" or "in 2 days". For timestamps older than 7 days it falls back to Intl.DateTimeFormat with { dateStyle: 'medium', timeStyle: 'short' } in the user's detected locale. The component accepts an iso prop and updates its display every 60 seconds via useEffect. A <time dateTime={iso}> element wraps the display text for semantic correctness.

Acceptance Criteria

  • All timestamp displays throughout the app use RelativeTime rather than raw ISO strings
  • Timestamps within the last 7 days show relative phrasing (e.g., "2 hours ago", "in 3 days")
  • Timestamps older than 7 days show an absolute date-time in the user's locale and timezone
  • Hovering the relative text shows a tooltip with the full absolute timestamp in the local timezone
  • The display refreshes every minute while the page is open without a full re-render of parent components
  • All CI checks (npm test, npm run build, ESLint/TypeScript) pass and the branch has no merge conflicts

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highuiUI styling and visual changes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions