Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

Statusline reset-time uses hardcoded America/Los_Angeles, ignores the system clock

Open xmasyx opened this issue 4 months ago • 1 comments

Files: LifeOS/install/LIFEOS/LIFEOS_StatusLine.sh (USER_TZ resolver) + LifeOS/install/settings.system.json.

Bug

The shipped settings.system.json hardcodes principal.timezone: "America/Los_Angeles", and the statusline's timezone resolver gives settings.principal.timezone the highest priority — above the system clock:

settings.principal.timezone  →  $TZ  →  /etc/localtime  →  /etc/timezone  →  UTC

Effect

The 5h/7d usage reset timestamp (resets_at, which arrives correctly as UTC from the API) gets formatted in Pacific time on every fresh install. Any user not in America/Los_Angeles sees the reset time off by N hours (e.g. 9h in Europe/Rome), and it never self-corrects when they travel — macOS updates /etc/localtime on timezone change, but the hardcoded setting overrides it.

Root cause

An explicit default TZ is a footgun. A stale/wrong explicit value is just as broken as the UTC fallback the existing code comment already worries about — and worse, it silently wins over the real system clock.

Suggested fix

Ship principal.timezone: "" (empty) by default so the resolver falls through to the OS clock, which self-corrects on travel. Treat an explicit IANA zone as opt-in for headless installs whose system TZ is UTC/wrong — not as the default.

xmasyx avatar Jul 15 '26 23:07 xmasyx

Fixed as suggested: the shipped default is now "timezone": "", so the resolver falls through to $TZ → /etc/localtime → /etc/timezone, which self-corrects on travel. The _docs field in the shipped settings now describes an explicit IANA zone as an opt-in for headless installs whose system clock is wrong, rather than a default.

Ships in the next release. Thanks. "A stale explicit value is worse than the fallback it was guarding against" is the right framing.

danielmiessler avatar Jul 16 '26 08:07 danielmiessler