Skip to content

Commit

Permalink
use local time-zone instead of utc for min/max date
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasvice committed Nov 2, 2023
1 parent 4574f5d commit 945dcc2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/zod/makeZodErrorMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,14 @@ export function getDescriptorItem<T>(
}

const timeOptions: FormatDateOptions | null =
date.getUTCHours() === 0 && date.getUTCMinutes() === 0
date.getHours() === 0 && date.getMinutes() === 0
? null
: {
hour: '2-digit',
minute: '2-digit',
}

value = intl.formatDate(value, {
timeZone: 'UTC',
...dateOptions,
...timeOptions,
})
Expand Down

0 comments on commit 945dcc2

Please sign in to comment.