Skip to content

Commit

Permalink
fix(locksmith): handling of timezone when setting up time
Browse files Browse the repository at this point in the history
  • Loading branch information
julien51 committed Nov 21, 2023
1 parent 7635657 commit 3f8a5dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion locksmith/src/operations/eventOperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export const getEventDataForLock = async (

if (types.isEvent) {
const timeZone = getAttribute('event_timezone')

const startDate =
getEventDate(
getAttribute('event_start_date'),
Expand All @@ -88,13 +87,15 @@ export const getEventDataForLock = async (
year: 'numeric',
month: 'long',
day: 'numeric',
timeZone,
})

const eventEndDate = endDate?.toLocaleDateString(undefined, {
weekday: 'long',
year: 'numeric',
month: 'long',
day: 'numeric',
timeZone,
})

const eventStartTime = startDate?.toLocaleTimeString('en-US', {
Expand Down

0 comments on commit 3f8a5dd

Please sign in to comment.