fix(immersion-tracker): preserve timestamps under Bun libsql

This commit is contained in:
2026-04-11 14:49:54 -07:00
parent c71482cb44
commit c1c40c8d40
9 changed files with 522 additions and 9 deletions
@@ -345,7 +345,11 @@ export function fromDbTimestamp(ms: number | bigint | string | null | undefined)
if (typeof ms === 'bigint') {
return Number(ms);
}
return Number(ms);
const normalized = normalizeTimestampString(ms);
if (/^-?\d+$/.test(normalized)) {
return Number(BigInt(normalized));
}
return Math.trunc(Number.parseFloat(normalized));
}
function getNumericCalendarValue(