| 226 | } |
| 227 | |
| 228 | function fmtTime(iso: string): string { |
| 229 | // Dumps are UTC; the dashboard renders local time (UTC+2), so include the date |
| 230 | // here to keep multi-day dump sets unambiguous when correlating views. |
| 231 | const d = new Date(iso); |
| 232 | if (Number.isNaN(d.getTime())) return iso; |
| 233 | const mm = String(d.getUTCMonth() + 1).padStart(2, "0"); |
| 234 | const dd = String(d.getUTCDate()).padStart(2, "0"); |
| 235 | const hh = String(d.getUTCHours()).padStart(2, "0"); |
| 236 | const mi = String(d.getUTCMinutes()).padStart(2, "0"); |
| 237 | const ss = String(d.getUTCSeconds()).padStart(2, "0"); |
| 238 | return `${mm}-${dd} ${hh}:${mi}:${ss} UTC`; |
| 239 | } |
| 240 | |
| 241 | function lastBreakpointIndex(segs: Segment[]): number { |
| 242 | let last = -1; |