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)' }}