Skip to content

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

Open

Description

@Gooder24

Before submitting

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 dd7255d

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions