Components
← All components

Local Time

stimeo--local-time

Renders a UTC timestamp as an absolute, viewer-localized time via Intl.

The stimeo--local-time controller follows the HTML <time> semantics. It reads the UTC datetime attribute and reformats the visible text into the viewer's locale and timezone with Intl.DateTimeFormat — a browser standard, no added dependency. The server can emit plain UTC (it never needs the viewer's timezone, so the markup stays cacheable) while the client localizes the display. Distinct from Relative Time's "3 minutes ago", this is the absolute-localization axis. The machine-readable datetime is left untouched so assistive tech and crawlers keep the canonical value, and an invalid datetime/timezone leaves the authored text in place. Formatting is a pure function of datetime, so a Turbo cache restore or morph re-runs it and stays consistent. Behavior only — styling is owned by this Playground.

running
  • Published UTC 2026-06-08 12:30
  • Released UTC 2026-01-01 09:00
  • Starts UTC 2026-12-24 21:00
  • Now UTC 2026-06-21 19:44

Each time is stored as UTC in the datetime attribute and localized in your browser to your locale and timezone, so two visitors in different zones see different clock times for the same instant. The machine-readable datetime stays fixed; hover any time to see a more detailed form in the title.