From 9d217aafaf136b009bb35b46287af1d964bba15d Mon Sep 17 00:00:00 2001 From: ajdj100 Date: Thu, 11 Dec 2025 12:05:41 -0500 Subject: [PATCH] improved robustness of time serialization system --- shared/utils/time.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shared/utils/time.ts b/shared/utils/time.ts index 416fba5..322b015 100644 --- a/shared/utils/time.ts +++ b/shared/utils/time.ts @@ -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");