Skip to content

Commit

Permalink
fix: make getTimeZoneOffset's 2nd arg optional vol.2
Browse files Browse the repository at this point in the history
  • Loading branch information
simPod committed Apr 16, 2024
1 parent b1ff162 commit 5d57f29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/format/formatters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const formatters: Record<
},
}

function getTimeZoneOffset(timeZone: string | undefined, originalDate?: Date) {
function getTimeZoneOffset(timeZone: string | undefined, originalDate: Date|undefined = undefined) {
const timeZoneOffset = timeZone
? tzParseTimezone(timeZone, originalDate, true) / MILLISECONDS_IN_MINUTE
: (originalDate?.getTimezoneOffset() ?? 0)
Expand Down

0 comments on commit 5d57f29

Please sign in to comment.