improved robustness of time serialization system

This commit is contained in:
2025-12-11 12:05:41 -05:00
parent 87c472e98e
commit 9d217aafaf

View File

@@ -1,5 +1,8 @@
export function toDateTime(date: Date): string {
console.log(date);
if (typeof date === 'string') {
date = new Date(date);
}
// This produces a CST-local time because server runs in CST
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, "0");