Skip to content

Commit

Permalink
Merge pull request #5 from aboutbits/date-local-time-zone
Browse files Browse the repository at this point in the history
use local time-zone instead of utc for min/max date
  • Loading branch information
lukasvice authored Nov 2, 2023
2 parents 4574f5d + 945dcc2 commit 69f56b9
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 69f56b9

Please sign in to comment.