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");