Open this example in the interactive library
Live preview
Source code
// components/TimezoneComparison.tsx
export default function TimezoneComparison({
iso = "2027-03-14T15:30:00Z",
}: { iso?: string } = {}) {
return (
<dl>
{["America/Toronto", "Europe/London", "Asia/Tokyo"].map((zone) => (
<div key={zone}>
<dt>{zone}</dt>
<dd>
{new Date(iso).toLocaleTimeString("en-CA", {
timeZone: zone,
timeStyle: "short",
})}
</dd>
</div>
))}
</dl>
);
}
