diff --git a/apps/web/src/app/[locale]/poll/[urlId]/edit-options/page.tsx b/apps/web/src/app/[locale]/poll/[urlId]/edit-options/page.tsx index d9e29e07bea..932187a3a83 100644 --- a/apps/web/src/app/[locale]/poll/[urlId]/edit-options/page.tsx +++ b/apps/web/src/app/[locale]/poll/[urlId]/edit-options/page.tsx @@ -79,7 +79,8 @@ const Page = () => { date: start.format("YYYY-MM-DD"), }; }), - timeZone: poll.timeZone ?? "", + timeZone: poll.timeZone || undefined, + autoTimeZone: !!poll.timeZone, duration: poll.options[0]?.duration || 60, }, }); @@ -106,7 +107,6 @@ const Page = () => { updatePollMutation( { urlId: poll.adminUrlId, - timeZone: data.timeZone, optionsToDelete: optionsToDelete.map(({ id }) => id), optionsToAdd, }, diff --git a/apps/web/src/components/create-poll.tsx b/apps/web/src/components/create-poll.tsx index 1299987e399..dc6b9e24d78 100644 --- a/apps/web/src/components/create-poll.tsx +++ b/apps/web/src/components/create-poll.tsx @@ -18,6 +18,7 @@ import { PollSettingsForm } from "@/components/forms/poll-settings"; import { Trans } from "@/components/trans"; import { useUser } from "@/components/user-provider"; import { setCookie } from "@/utils/cookies"; +import { getBrowserTimeZone } from "@/utils/date-time-utils"; import { usePostHog } from "@/utils/posthog"; import { trpc } from "@/utils/trpc/client"; @@ -47,6 +48,8 @@ export const CreatePoll: React.FunctionComponent = () => { description: "", location: "", view: "month", + autoTimeZone: true, + timeZone: user.timeZone || getBrowserTimeZone(), options: [], hideScores: false, hideParticipants: false, @@ -76,13 +79,13 @@ export const CreatePoll: React.FunctionComponent = () => {