From 47eb9c79b2d8d7928346cc068539318ce63f9a13 Mon Sep 17 00:00:00 2001 From: Alex Drankou Date: Tue, 14 Jul 2026 16:30:02 +0200 Subject: [PATCH] fix(timezone): default to UTC instead of browser timezone Previously the provider auto-detected and persisted the browser timezone when no preference was saved. Now the fallback stays UTC; users can still opt into their browser timezone from settings. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/features/dashboard/timezone/context.tsx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/features/dashboard/timezone/context.tsx b/src/features/dashboard/timezone/context.tsx index 8e39e8f14..eab4d8e6a 100644 --- a/src/features/dashboard/timezone/context.tsx +++ b/src/features/dashboard/timezone/context.tsx @@ -6,12 +6,11 @@ import { type ReactNode, useCallback, useContext, - useEffect, useMemo, useState, } from 'react' import { type Timezone, TimezoneSchema } from './schema' -import { getBrowserTimezone, parseTimezone } from './utils' +import { parseTimezone } from './utils' const DEFAULT_TIMEZONE = TimezoneSchema.parse('UTC') @@ -56,14 +55,6 @@ export const TimezoneProvider = ({ parsedInitialTimezone ?? DEFAULT_TIMEZONE ) - useEffect(() => { - if (parsedInitialTimezone) return - - const browserTimezone = getBrowserTimezone() - setTimezoneState(browserTimezone) - void persistTimezone(browserTimezone) - }, [parsedInitialTimezone]) - const setTimezone = useCallback( async (nextTimezone: Timezone) => { const previousTimezone = timezone