Skip to content

Statusline "today" shows $0.00 due to timezone defaulting to UTC #778

@CaffiendDevKit

Description

@CaffiendDevKit

When using ccusage statusline, the "today" value shows $0.00 even though ccusage daily correctly shows usage for the current day. This appears to be a timezone issue - the statusline seems to default to UTC rather than detecting the local timezone.

Environment:

ccusage: 16.1.2
Runtime: Bun 1.3.5
OS: Ubuntu (WSL2)
Timezone: Australia/Perth (UTC+8)

Steps to reproduce:

Be in a timezone significantly offset from UTC (e.g., UTC+8)
Use Claude Code during local daytime hours
Configure statusline in ~/.claude/settings.json
Observe "today" shows $0.00 while "session" correctly increments
Run bunx ccusage daily - shows correct usage for the day

Workaround:

Creating a ccusage.json config file in the ~/.claude. directory with the timezone setting resolves the issue.

{
  "$schema": "https://ccusage.com/config-schema.json",
  "defaults": {
    "timezone": "Australia/Perth"
  }
}

Suggestion:

Consider having the statusline default to the system's local timezone (like daily appears to do) rather than UTC, or document that timezone configuration is required for accurate "today" aggregation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions