t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Scheduled task schedule labels ignore the Time format setting

Open Gooder24 opened this issue 2 weeks ago • 0 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate. #27233 and #19930 cover the time pickers; this covers the schedule summary label, which no issue or open PR touches (#34957 lists it under "Not in this change").
  • [x] I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Create two scheduled tasks: one Once at 17:30 and one Daily/Weekdays at 17:30.
  2. In Settings → General → Time format, select 24-hour.
  3. Open Settings → Scheduled tasks, or a thread the tasks belong to (thread details → Automations).
  4. Switch Time format to 12-hour and look again.

Expected behavior

Both summaries follow the setting, like the snooze menu and chat timestamps do: 17:30 with 24-hour, 5:30 PM with 12-hour.

Actual behavior

The two schedule types each ignore the setting in a different way, so one list mixes clocks:

Time format One-off task Daily task
24-hour Once, Nov 20, 2026, 5:30 PM Weekdays at 17:30
12-hour Once, Nov 20, 2026, 5:30 PM Weekdays at 17:30

Settings → Scheduled tasks on main with 24-hour selected

Impact

Minor bug or occasional failure

Version or commit

main at dd7255d338

Environment

Web dev build in Chromium (en-US, Europe/Bratislava), Linux. Desktop runs the same web code.

Additional context

scheduleLabel in apps/web/src/components/settings/scheduledTasksSettings.logic.ts builds the text and never sees the setting:

  • once goes through a module-level Intl.DateTimeFormat(undefined, { dateStyle: "medium", timeStyle: "short" }), so it always uses the browser's default clock.
  • fixed_time prints the stored HH:MM string as is, so it is always 24-hour.

Callers: ScheduledTaskRow in ScheduledTasksSettings.tsx and taskScheduleLine in chat/ThreadAutomationsPanel.tsx (row and tooltip).

Where else times ignore the setting (audit of main)

The same defect, a time formatted outside apps/web/src/timestampFormat.ts, keeps coming back surface by surface. Current state:

Surface Status
Snooze menu presets, chat timestamps, usage labels, usage-limit reset follow the setting
PR comment tooltips fixed in #35396
Custom snooze dialog time field #19930, PR #34957
Snooze presets settings and scheduled task Run at time fields #27233, PRs #34957 and #28021
GitHub sign-in code expiry, slow-request toast, Sharing & access tooltips, mobile clients label PR #31916
Scheduled task summary labels this issue
Scheduled task Run on field for one-off tasks (<input type="datetime-local">) no issue or PR yet; same browser-locale cause as #27233
Mobile has no Time format setting; message timestamps follow Android's 24-hour toggle (#33078), but the snooze menu (default snoozeTimeOfDayLabel in packages/client-runtime/src/state/threadSettled.ts), scheduled task screens, usage reset times and widgets use the locale default and ignore it

Once the open PRs land, a lint rule like the existing t3code/* ones could keep this from coming back: flag toLocaleTimeString, toLocaleString and Intl.DateTimeFormat with hour or timeStyle in apps/web/src outside timestampFormat.ts.

Workaround

None in the app. The daily label is right only with 24-hour, the one-off label only when the browser locale already uses the chosen clock.

Gooder24 avatar Nov 15 '26 18:11 Gooder24