Statusline: timezone is hardcoded to America/Los_Angeles instead of reading from settings.json
Problem
The statusline-command.sh script has the timezone hardcoded to America/Los_Angeles in two places (the format_reset_time and clock_time functions):
local_dt = dt.astimezone(ZoneInfo('America/Los_Angeles'))
This means the 5h/7d usage reset times display in US Pacific time regardless of the user's location. For users outside the US, the reset times are confusing and don't match their local clock.
Expected Behavior
The script should read the timezone from settings.json where users already configure it:
"principal": {
"timezone": "Europe/Berlin"
}
Suggested Fix
Read the timezone dynamically from settings.json and pass it into the Python snippets, falling back to the system timezone or UTC if not configured:
USER_TZ=$(jq -r '.principal.timezone // "UTC"' "$SETTINGS_FILE" 2>/dev/null)
Then use $USER_TZ instead of the hardcoded 'America/Los_Angeles' string in both Python blocks.
Ironically, line 596 already has a comment saying # Uses TZ from settings.json (principal.timezone) for correct local time — but the code below it doesn't actually do that.
Affected Lines
- Line ~653 (
format_reset_timefunction) - Line ~923 (
clock_timefunction)
Confirmed this bug on PAI v3.0 / WSL2. Fixed locally by reading the timezone from settings.json instead of hardcoding. The statusline now correctly reads principal.timezone from settings.
Fixed in v4.0.1 — the statusline now reads principal.timezone from settings.json instead of hardcoding America/Los_Angeles. Thanks for reporting this.