Files
821a16648f fix: Timezone in Email Embed not working #15525 (#15537)
Co-authored-by: Keith Williams <[email protected]>
Co-authored-by: Amit Sharma <[email protected]>
Co-authored-by: Udit Takkar <[email protected]>
Co-authored-by: Anik Dhabal Babu <[email protected]>
Co-authored-by: Hariom <[email protected]>
2025-01-03 08:43:09 +00:00

15 lines
637 B
TypeScript

/**
* TODO: We could convert it into a hook and then we can access bookerStore and timePreferences stores directly here, avoiding the need to do it by the caller
*/
export const getBookerTimezone = ({
storeTimezone,
bookerUserPreferredTimezone,
}: {
storeTimezone: string | null;
bookerUserPreferredTimezone: string;
}) => {
// BookerStore timezone is the one that is updated no matter what could be the reason of the update
// e.g. timezone configured through cal.tz query param is available there but not in the preferences as those are booker user's preferences
return storeTimezone ?? bookerUserPreferredTimezone;
};