diff --git a/backend/webui/src/components/AutomationSettings.test.tsx b/backend/webui/src/components/AutomationSettings.test.tsx
index c2a14239..96887b40 100644
--- a/backend/webui/src/components/AutomationSettings.test.tsx
+++ b/backend/webui/src/components/AutomationSettings.test.tsx
@@ -3,17 +3,19 @@ import '@testing-library/jest-dom/vitest'
import { afterEach, beforeEach, expect, it, vi } from 'vitest'
import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'
import AutomationSettings from './AutomationSettings'
+import { formatDateTime, setDisplayTimezone } from '../utils/datetime'
const state = vi.hoisted(() => ({ next: '2026-09-14T04:30:00+00:00' as string | null, update: vi.fn() }))
vi.mock('../hooks/useFinetuning', () => ({
useCronJobs: () => ({ data: [{ job_id: 'daily', description: '', enabled: true, schedule: '30 4 * * *', last_run: null, next_run: state.next }], isLoading: false, refetch: vi.fn() }),
useToggleCronJob: () => ({ mutateAsync: vi.fn() }), useRunCronJob: () => ({ mutateAsync: vi.fn() }),
useUpdateCronSchedule: () => ({ mutateAsync: state.update }),
}))
-beforeEach(() => { state.next = '2026-09-14T04:30:00+00:00'; state.update.mockReset().mockResolvedValue({}) })
-afterEach(cleanup)
-it('shows the UTC next-run instant in IST while preserving the UTC expression when edited', async () => {
+beforeEach(() => { setDisplayTimezone('Asia/Kolkata'); state.next = '2026-09-14T04:30:00+00:00'; state.update.mockReset().mockResolvedValue({}) })
+afterEach(() => { cleanup(); setDisplayTimezone(null) })
+it('shows the UTC next-run instant in the display timezone while preserving the UTC expression when edited', async () => {
render()
- expect(screen.getByText(/Next:/)).toHaveTextContent(/10:00 am IST/i)
+ expect(screen.getByText(/Next:/)).toHaveTextContent(formatDateTime('2026-09-14T04:30:00Z'))
+ expect(screen.getByText(/Next:/)).toHaveTextContent(/10:00/)
fireEvent.click(screen.getByText('Schedule and last run'))
expect(screen.getByText(/At 04:30 AM/)).toHaveTextContent('(UTC)')
fireEvent.click(screen.getByRole('button', { name: 'Edit schedule' }))
diff --git a/backend/webui/src/components/AutomationSettings.tsx b/backend/webui/src/components/AutomationSettings.tsx
index fbd39fb6..27479af8 100644
--- a/backend/webui/src/components/AutomationSettings.tsx
+++ b/backend/webui/src/components/AutomationSettings.tsx
@@ -3,6 +3,7 @@ import { Clock, ToggleLeft, ToggleRight, Edit3, Check, X, Play, RefreshCw, Eye }
import cronstrue from 'cronstrue'
import { useCronJobs, useToggleCronJob, useUpdateCronSchedule, useRunCronJob } from '../hooks/useFinetuning'
import { Alert, Button, Card, IconButton, StateBadge, StateTone } from './ui'
+import { formatDateTime, useDisplayTimezone } from '../utils/datetime'
// Human-friendly names + what kind of automation each job is. Trigger-now lives
// on the Training page; this card owns only "should it run / when".
@@ -34,10 +35,11 @@ function humanCron(expr: string): string {
function formatTs(iso: string | null): string {
if (!iso) return 'Never'
- return `${new Date(iso).toLocaleString('en-IN', { timeZone: 'Asia/Kolkata', dateStyle: 'medium', timeStyle: 'short' })} IST`
+ return formatDateTime(iso)
}
export default function AutomationSettings({ isAdmin }: { isAdmin: boolean }) {
+ const timezone = useDisplayTimezone()
const { data: jobs = [], isLoading, refetch } = useCronJobs()
const toggleJob = useToggleCronJob()
const updateSchedule = useUpdateCronSchedule()
@@ -96,7 +98,7 @@ export default function AutomationSettings({ isAdmin }: { isAdmin: boolean }) {
Automation & Schedules
- Next runs are shown in IST. Enabling or disabling a job takes effect immediately.
+ Next runs are shown in {timezone}. Enabling or disabling a job takes effect immediately.
{session.state === 'paused' ? (session.failure_kind === 'repeated_tool_call' ? 'Repeated identical tool calls stopped this investigation. Saved source reads and drafts remain inspectable. Restart begins a fresh attempt; no automatic retry is scheduled.' : 'The investigation reached its work limit. Restart to begin a new attempt with completed source groups retained; no automatic retry is scheduled. Earlier exchanges remain available below.') : session.state === 'failed' ? 'Preparation stopped before a reviewed draft was completed. Retry preparation, or inspect the details below.' : session.state === 'stale' ? 'This draft needs refreshing against the current sources before it can be approved.' : session.failure_kind === 'time_slice' ? 'Saved work will continue in the queue.' : session.error}
{session.investigation_activity.tool_calls} tool calls · {session.investigation_activity.rounds} model rounds · Pi {session.investigation_activity.runtime_version}
{session.investigation_activity.tool_calls} tool calls · {session.investigation_activity.rounds} model rounds · Pi {session.investigation_activity.runtime_version}