Skip to content

Commit 945dcc2

Browse files
committed
use local time-zone instead of utc for min/max date
1 parent 4574f5d commit 945dcc2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/zod/makeZodErrorMap.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,14 @@ export function getDescriptorItem<T>(
7474
}
7575

7676
const timeOptions: FormatDateOptions | null =
77-
date.getUTCHours() === 0 && date.getUTCMinutes() === 0
77+
date.getHours() === 0 && date.getMinutes() === 0
7878
? null
7979
: {
8080
hour: '2-digit',
8181
minute: '2-digit',
8282
}
8383

8484
value = intl.formatDate(value, {
85-
timeZone: 'UTC',
8685
...dateOptions,
8786
...timeOptions,
8887
})

0 commit comments

Comments
 (0)