anomalyco / anomalyco/opencode
[FEATURE]: Timestamps honor LANG/LC_TIME (24h) or add locale/format setting
@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:
- Resolve the UI locale from
LANG/LC_TIME(fallbacken), or - Add a timestamp format setting (e.g.
tui.jsontimestamp_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 listand 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.