Merge pull request #675 from dermotduffy/ios-recordings-parse

Use a proper ISO8601 formatted date to fix the timeline in Safari/iOS.
This commit is contained in:
Dermot Duffy
2022-06-11 17:20:33 -07:00
committed by GitHub
+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(),