Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

✨ Show the time zone in the finalize summary step (#3430)

Luke Vella1d6525242677
diff --git a/apps/web/src/features/poll/components/finalize-poll-dialog.tsx b/apps/web/src/features/poll/components/finalize-poll-dialog.tsx
index b066207ea..c6c3f1b13 100644
--- a/apps/web/src/features/poll/components/finalize-poll-dialog.tsx
+++ b/apps/web/src/features/poll/components/finalize-poll-dialog.tsx
@@ -25,6 +25,7 @@ import {
DataListRow,
} from "@/components/data-list";
import { OptimizedAvatarImage } from "@/components/optimized-avatar-image";
+import { getCityFromTimezoneId } from "@/components/time-zone-picker/timezone-data";
import { primePayWall, usePayWallStore } from "@/features/billing/client";
import { PayWallDialog } from "@/features/billing/components/pay-wall-dialog";
import { ConferencingProviderIcon } from "@/features/conferencing/components/conferencing-provider-icon";
@@ -40,6 +41,7 @@ import {
EventTimeRange,
} from "@/features/scheduled-event/components/event-date-time";
import { Trans } from "@/i18n/client";
+import { useDateTimeConfig } from "@/lib/datetime/client";
import { trpc } from "@/trpc/client";
type RankedOption = {
@@ -195,7 +197,11 @@ function PickDateStep({
function PickedDate({ option }: { option: RankedOption }) {
const poll = usePoll();
+ const { timeZone: displayTimeZone } = useDateTimeConfig();
const allDay = option.duration === 0;
+ // Fixed instants render in the viewer's zone; floating times have none.
+ const cityTimeZone =
+ !allDay && poll.timeZone !== null ? displayTimeZone : undefined;
return (
<div className="flex items-start gap-3">
{/* The icon centers on the first line, not the block. */}
@@ -218,6 +224,17 @@ function PickedDate({ option }: { option: RankedOption }) {
allDay={allDay}
timeZone={poll.timeZone}
/>
+ {cityTimeZone ? (
+ <>
+ {" ("}
+ <Trans
+ i18nKey="cityTime"
+ defaults="{city} time"
+ values={{ city: getCityFromTimezoneId(cityTimeZone) }}
+ />
+ {")"}
+ </>
+ ) : null}
</div>
</div>
</div>