File
Blob: ui/operator/SnapshotTime.svelte
| 1 | <script lang="ts"> |
| 2 | let { value }: { value: string } = $props(); |
| 3 | const formatTime = (timestamp: string) => { |
| 4 | const date = new Date(timestamp); |
| 5 | return Number.isNaN(date.getTime()) |
| 6 | ? timestamp |
| 7 | : date.toISOString().replace('T', ' ').replace(/\.\d{3}Z$/, ' UTC'); |
| 8 | }; |
| 9 | </script> |
| 10 | |
| 11 | <time datetime={value} class="tabular-nums">{formatTime(value)}</time> |