MCPcopy Create free account
hub / github.com/cortexkit/magic-context / fmtTime

Function fmtTime

packages/plugin/scripts/analyze-cache-busts.ts:228–239  ·  view source on GitHub ↗
(iso: string)

Source from the content-addressed store, hash-verified

226}
227
228function 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
241function lastBreakpointIndex(segs: Segment[]): number {
242 let last = -1;

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected