This commit is contained in:
2026-02-16 00:23:56 -06:00
parent bb6c9c3aa9
commit 91ed4015da

View File

@@ -136,10 +136,10 @@ function formatTime(t: string): string {
} }
function formatTimeLocal(t: string, offsetMinutes: number): string { function formatTimeLocal(t: string, offsetMinutes: number): string {
const mins = timeToMinutes(t) - offsetMinutes; const totalMins = timeToMinutes(t) - offsetMinutes;
let h = Math.floor(mins / 60) % 24; let h = Math.floor(totalMins / 60) % 24;
if (h < 0) h += 24; if (h < 0) h += 24;
const m = mins % 60; let m = totalMins % 60;
if (m < 0) m += 60; if (m < 0) m += 60;
const period = h >= 12 ? 'PM' : 'AM'; const period = h >= 12 ? 'PM' : 'AM';
const dh = h > 12 ? h - 12 : h === 0 ? 12 : h; const dh = h > 12 ? h - 12 : h === 0 ? 12 : h;