/resume shows '1 day ago' for today's sessions (timezone bug)
Bug Description
/resume displays "1 day ago" for sessions that were created/modified today. Only the most recent sessions (within the last few minutes) show correct relative timestamps.
Environment
- Claude Code v2.1.90
- macOS (Darwin 25.4.0)
- Timezone: UTC+8 (CST)
- Using custom profile (
~/.claude-profile-max)
Steps to Reproduce
- Be in a timezone significantly offset from UTC (e.g., UTC+8)
- Use Claude Code throughout the day (multiple sessions)
- Run
/resumein the evening
Expected Behavior
Sessions from today should show relative times like "2 hours ago", "6 hours ago", etc.
Actual Behavior
All sessions except the very recent ones (last few minutes) show "1 day ago", even though:
- Session
.jsonlfiles have correctmtime(verified withls -lt) history.jsonlentries have correct timestamps- Sessions from 14:13, 20:12, 20:18 today all display as "1 day ago"
Investigation
Verified that:
history.jsonlcontains 297 entries for today across 15 unique sessions, all with correct timestamps- Session
.jsonlfile modification times are correct (Apr 2 timestamps) - System timezone is correctly set (
dateshows CST, UTC offset is +8)
The relative time calculation in /resume appears to use UTC date boundaries instead of local time, causing sessions before ~08:00 local (00:00 UTC) to appear as "yesterday". However, sessions at 14:13 and later also show "1 day ago", suggesting the bug may be more than a simple UTC boundary issue.
Possibly Related
v2.1.90 release notes mention a fix for --resume complete prompt restoration loss — this is a separate display issue.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗