From 13570461609fd9f64760483b141872535099b700 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sun, 5 Apr 2026 21:39:08 -0400 Subject: [PATCH] feat(settings): add timezone field to General tab - New Timezone section with text input + Detect button - Detect auto-fills from browser Intl API - Save calls PUT /api/settings (which now propagates to scheduler) - Briefing tab firing timezone hint reads stored value instead of live browser API Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/views/SettingsView.vue | 50 ++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/SettingsView.vue b/frontend/src/views/SettingsView.vue index 37a8a56..61f9f98 100644 --- a/frontend/src/views/SettingsView.vue +++ b/frontend/src/views/SettingsView.vue @@ -15,6 +15,27 @@ const toastStore = useToastStore(); const pushStore = usePushStore(); const assistantName = ref(""); const defaultModel = ref(""); +const userTimezone = ref(""); +const savingTimezone = ref(false); +const timezoneSaved = ref(false); + +function detectTimezone() { + userTimezone.value = Intl.DateTimeFormat().resolvedOptions().timeZone; +} + +async function saveTimezone() { + savingTimezone.value = true; + timezoneSaved.value = false; + try { + await apiPut('/api/settings', { user_timezone: userTimezone.value }); + timezoneSaved.value = true; + setTimeout(() => (timezoneSaved.value = false), 2000); + } catch { + toastStore.show('Failed to save timezone', 'error'); + } finally { + savingTimezone.value = false; + } +} const backgroundModel = ref(""); const installedModels = ref([]); const defaultChatModel = ref(""); @@ -710,6 +731,7 @@ onMounted(async () => { const allSettings = await apiGet>("/api/settings"); defaultModel.value = allSettings.default_model ?? ""; backgroundModel.value = allSettings.background_model ?? ""; + userTimezone.value = allSettings.user_timezone ?? ""; chatRetentionDays.value = allSettings.chat_retention_days !== undefined ? Number(allSettings.chat_retention_days) : 90; @@ -1463,6 +1485,32 @@ function formatUserDate(iso: string): string { + +
+

Timezone

+

Used to schedule briefings and format times in chat. Set this to your local IANA timezone (e.g. America/New_York, Europe/London).

+
+ +
+ + +
+

Click Detect to auto-fill from your browser.

+
+
+ + Saved! +
+
+
@@ -2104,7 +2152,7 @@ function formatUserDate(iso: string): string {

- Firing in timezone: {{ Intl.DateTimeFormat().resolvedOptions().timeZone }} + Firing in timezone: {{ userTimezone || 'UTC (not configured — set in General settings)' }}