Workaround: reliable timestamps via `date` bash call (until native support)
The problem
Claude Code has no internal clock. It confidently hallucinates timestamps — writing "2:00 AM" in session summaries when it's actually 8:34 AM, or telling users to go to bed when it's 9pm local time (see #32590).
The currentDate system context gives the date but not the time, and Claude has no timezone awareness.
The workaround
Save this instruction in your project's CLAUDE.md or memory:
At the start of every response, run `date "+%y/%m/%d %H:%M"` via Bash
and display the result before your answer.
That's it. Claude will now call date as a bash tool at every turn and show the real local time.
Example output
26/03/14 09:30
Here's the fix for the auth issue...
Cost
- ~1 bash tool call per response (the
datecommand) - ~200ms latency per response (tool call overhead)
- Negligible token cost — a few input tokens for the tool request, ~15 characters of output
- Over a 100-message session: < $0.01 total
Why it works
datereads the system clock — always accurate, timezone-aware- Claude stops inventing timestamps because it has a real one
- The instruction persists via CLAUDE.md/memory across sessions
- Works on macOS, Linux, WSL — anywhere bash is available
What would be better (feature request)
Injecting Current time: 2026-03-14 09:30 CET into the system prompt on each user message — zero tool calls, zero latency, zero tokens. This is what #34186 and #33083 propose.
Until then, the date workaround is free, reliable, and takes 10 seconds to set up.
Related issues
- #21051 — Display message timestamps in CLI
- #34186 — Include timestamps visible to the model
- #32590 — Temporal continuity (the "go to bed" incident)
- #33083 — Session-relative elapsed time
- #32949 — Per-message timestamps in conversation view
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗