Use a proper ISO8601 formatted date for Safari/iOS.

This commit is contained in:
Dermot Duffy
2022-06-11 17:17:41 -07:00
parent 0965ce35c7
commit 1adb2983c4
+1 -1
View File
@@ -34,7 +34,7 @@ const recordingSummarySchema = z
day: z.preprocess((arg) => {
// Must provide the hour:minute:second on parsing or Javascript will
// assume UTC midnight.
return typeof arg === 'string' ? new Date(`${arg} 00:00:00`) : arg;
return typeof arg === 'string' ? new Date(`${arg}T00:00:00`) : arg;
}, z.date()),
events: z.number(),
hours: recordingSummaryHourSchema.array(),