claude-code - 💡(How to fix) Fix [BUG] Stats dashboard "Peak hour" appears off by one hour

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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

  1. Use Claude Code regularly for a month so the stats dashboard has data.
  2. Open the "What's up next, <name>" overview (Overview tab, "All" range).
  3. Note the "Peak hour" value.
  4. Aggregate hour-of-day counts from local ~/.claude/projects/*.jsonl (count user + assistant entries by timestamp local hour).
  5. 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" />

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING