[BUG] Stats dashboard "Peak hour" appears off by one hour
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The "What's up next" overview shows "Peak hour: 7 PM", but aggregating my local session JSONL files in ~/.claude/projects/ shows 6 PM (18:00) is actually the busiest hour by a clear margin. Looks like a timezone or hour-bucketing bug in the server-side aggregation.
What Should Happen?
Peak hour should reflect the hour with the most messages in my local timezone. For my data (2026-04-27 → 2026-05-28, IST/UTC+5:30) that is 6 PM, not 7 PM.
Error Messages/Logs
Steps to Reproduce
- Use Claude Code regularly for a month so the stats dashboard has data.
- Open the "What's up next, <name>" overview (Overview tab, "All" range).
- Note the "Peak hour" value.
- Aggregate hour-of-day counts from local ~/.claude/projects/*.jsonl (count user + assistant entries by timestamp local hour).
- Compare.
For my account over 2026-04-27 → 2026-05-28 (26 active days, 130 sessions, 82,187 messages), top hours are:
18:00 — 12,013 messages
17:00 — 9,861
12:00 — 9,684
15:00 — 9,291
16:00 — 9,120
19:00 (7 PM) is not in the top 5, yet the dashboard reports it as the peak.
All other dashboard fields (Active days 26, streaks 4d/6d, Favorite model Opus 4.7, ~30.7M input+output tokens) match local data, so this looks isolated to peak-hour bucketing.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.121
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Local timezone: IST (UTC+5:30).
Suspected cause: server-side aggregation buckets timestamps in UTC (or a fixed offset) rather than the user's local timezone, causing the displayed peak hour to be shifted by ~1 hour for users outside that zone.
<img width="838" height="615" alt="Image" src="https://github.com/user-attachments/assets/240e6b74-6ba1-4ac8-87d9-7047e4664eca" />
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗