Feature Request: Support LC_TIME locale for /usage command time formatting

Status Closed — not planned
Reported on v2.1.2
Maintainer reply None cached
Activity 6 comments · opened Jan 24, 2026 · closed May 29, 2026

Description

The /usage command currently displays times in 12-hour format (e.g., "5am", "6pm") regardless of the system's LC_TIME locale setting.

Current Behavior

Current session
██████████████████████████████████▌   69% used
Resets 5am (Europe/Saratov)

Current week (all models)
███████████████████████████████████████████▌   87% used
Resets 6pm (Europe/Saratov)

Expected Behavior

When LC_TIME=en_GB.UTF-8 (or other locales that use 24-hour format) is set, the times should be displayed in 24-hour format:

Current session
██████████████████████████████████▌   69% used
Resets 05:00 (Europe/Saratov)

Current week (all models)
███████████████████████████████████████████▌   87% used
Resets 18:00 (Europe/Saratov)

Environment

  • OS: Linux (WSL2)
  • Claude CLI version: 2.1.2
  • LC_TIME is properly set in environment: LC_TIME=en_GB.UTF-8
  • System locale is configured and generated: locale-gen en_GB.UTF-8

Steps to Reproduce

  1. Set export LC_TIME=en_GB.UTF-8 in .bashrc
  2. Generate locale: sudo locale-gen en_GB.UTF-8
  3. Verify locale is active: locale | grep LC_TIME shows LC_TIME=en_GB.UTF-8
  4. Launch Claude CLI
  5. Run /usage command
  6. Observe that time is still shown in 12-hour format (5am, 6pm) instead of 24-hour format (05:00, 18:00)

Proposed Solution

Respect the system's LC_TIME locale setting when formatting timestamps in the /usage command output. This would make Claude CLI more internationally friendly and consistent with user expectations based on their locale settings.

Additional Context

Many international users prefer 24-hour time format, which is the standard in most countries outside the US. Respecting the LC_TIME locale would make the CLI experience more localized and user-friendly.

View original on GitHub ↗

5 Comments

lfarkas · 8 months ago

how can i vote for it?:-)
anyway:

★ Insight ─────────────────────────────────────
JavaScript locale-aware time formatting: In JS, toLocaleTimeString() without arguments should respect the runtime's locale. However, if hour12: true is explicitly passed as an option, it overrides the locale and
forces AM/PM. The fix is to either omit hour12 entirely or use undefined as the locale parameter, which tells the runtime to use the system's LANG/LC_TIME environment variables. In Node.js/Bun, ICU data
availability also matters — some minimal builds don't include full locale data.
─────────────────────────────────────────────────

Here's what I found:

Location: The time formatting code is in the compiled Claude Code binary (~/.local/share/claude/versions/2.1.44), not in this repository. This repo contains plugins, scripts, and docs but not the main CLI
source.

Root cause: The /usage command's "Last updated" time uses toLocaleTimeString() with what appears to be a hardcoded hour12 option, forcing 12-hour AM/PM format regardless of your LC_TIME setting.

Fix: The source code would need to stop hardcoding hour12: true and let the locale determine the format.

olemd · 5 months ago

Confirming this still reproduces on Claude Code 2.1.119 (Node v22.22.2, Debian Linux) with LANG=LC_TIME=en_GB.UTF-8. /usage reset times render as "5am"/"6pm" rather than 05:00/18:00 — same as reported at 2.1.2.

FYI #52214 (opened 2026-04-23, ru_RU.UTF-8) looks like the same bug.

github-actions[bot] · 4 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

sewi-cpan · 4 months ago
Closing for now — inactive for too long. Please open a new issue if this is still relevant.

Re-opened as #69265 as requested

marcindulak · 1 month ago

This issue was incorrectly closed, despite having reproduction steps and Claude version. This problem is tracked in https://github.com/anthropics/claude-code/issues/87647.

Showing cached comments. Read the full discussion on GitHub ↗