Skip to content

[FEATURE]: Timestamps honor LANG/LC_TIME (24h) or add locale/format setting #42782

Closed as not planned

Description

@bandit420

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Note: This feature request was generated by an LLM—I was just looking for a way to display timestamps in 24-hour format within the TUI. :)

TUI/CLI timestamps always render 12h AM/PM (e.g. 4:11 PM in opencode session list, message timestamps), regardless of system locale. The UI locale is resolved from stored preference → navigator detection → default en; LANG/LC_TIME (here de_DE.UTF-8) are ignored. There is no config option, keybind, or command to change it.

Request either:

  1. Resolve the UI locale from LANG/LC_TIME (fallback en), or
  2. Add a timestamp format setting (e.g. tui.json timestamp_format / timezone).

Impact: users on 24h locales (de, fr, da, …) get timestamps inconsistent with their system clock. Host-default paths (formatTranscript, toLocaleString()) already honor the env, so this only affects the UI locale.

Context: Intl.DateTimeFormat in packages/session-ui/src/components/message-part.tsx uses i18n.locale(); session list times use Locale.todayTimeOrDateTime; LanguageProvider (packages/app/src/context/language.tsx) resolves locale as localStorage opencode.global.dat:language → navigator.languages → en.

Environment:

  • opencode 1.18.18 (TUI/CLI, not web/desktop)
  • OS: CachyOS Linux (Arch-based), kernel locale LANG=de_DE.UTF-8 (generated)
  • Reproduced via opencode session list and TUI message timestamps

Related: #30347 (timestamps use UTC instead of local time, closed as not
planned) — distinct from this request: that one concerns the timezone
(UTC vs local), this one the clock format (12h vs 24h) driven by the UI
locale.

Activity

  1. github-actions commented on Aug 15, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

  2. github-actions commented on Oct 16, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

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