diff --git a/src/routes/create_new_engagement/__tests__/create_new_engagement.spec.tsx b/src/routes/create_new_engagement/__tests__/create_new_engagement.spec.tsx index 78bf0397..ecb338a6 100644 --- a/src/routes/create_new_engagement/__tests__/create_new_engagement.spec.tsx +++ b/src/routes/create_new_engagement/__tests__/create_new_engagement.spec.tsx @@ -117,6 +117,7 @@ describe('Create New Engagement Route', () => { engagement_region: 'dev-1', engagement_type: 'Residency', project_name: 'Mars Rover', + timezone: 'America/New_York', }); }); }); diff --git a/src/routes/create_new_engagement/create_new_engagement.tsx b/src/routes/create_new_engagement/create_new_engagement.tsx index e6574486..5360deaf 100644 --- a/src/routes/create_new_engagement/create_new_engagement.tsx +++ b/src/routes/create_new_engagement/create_new_engagement.tsx @@ -63,6 +63,14 @@ export function CreateNewEngagementForm() { const { logEvent } = useAnalytics(); let uuid = null; + const getTimeZone = () => { + try { + return Intl.DateTimeFormat().resolvedOptions().timeZone; + } catch (e) { + return 'Europe/London'; + } + }; + useEffect(() => { setCopiedEngagement( findEngagementToCopy(engagements, selectedProjectNameToFind) @@ -107,6 +115,7 @@ export function CreateNewEngagementForm() { engagementFormConfig?.basic_information?.engagement_types?.options?.find?.( e => e.default )?.value, + timezone: getTimeZone(), }); uuid = result.uuid; }