anomalyco / anomalyco/opencode

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

Open
#42,782 1 comment 1 reaction 1 assignee View on GitHub

@simonklee is already working on this.

Since Aug 15, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

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:languagenavigator.languagesen.

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.