Agent Diagnostic
Investigated timestamp formatting across CLI and TUI crates. Loaded skills: create-github-issue, Explore (codebase search).
Findings:
format_epoch_ms() in crates/openshell-cli/src/run.rs:169 performs manual UTC arithmetic (secs / 86400, civil_from_days) to convert epoch milliseconds to YYYY-MM-DD HH:MM:SS. This always produces UTC time-of-day components regardless of the user's local timezone.
format_timestamp() in crates/openshell-tui/src/lib.rs:2484 has the same pattern (days_to_ymd helper).
format_timestamp_ms() in crates/openshell-cli/src/run.rs:7823 (audit log timestamps) also uses UTC arithmetic.
format_age() in the TUI (relative time like "5m", "2h 30m") is not affected — it computes UTC-to-UTC differences correctly.
chrono = "0.4" is already a dependency of the CLI crate; the TUI would need it added.
- JSON output (
sandbox_to_json, provider_to_json) also uses format_epoch_ms, producing UTC strings with no timezone indicator.
Description
Actual behavior: openshell sandbox list displays the CREATED column in UTC. For users in non-UTC timezones, timestamps appear to be hours in the past. For example, in UTC+2 (CEST), a sandbox created at 16:56 local time shows as 14:56:41, making it look like it was created 2 hours ago.
NAME CREATED PHASE
kaiden-test 2026-07-01 14:51:03 Ready
apt-capelin 2026-07-01 14:56:41 Ready
Expected behavior: The CREATED column should display timestamps in the user's local timezone. JSON output (--output json) should use ISO 8601 with timezone offset (e.g., 2026-07-01T16:56:41+02:00).
Reproduction Steps
- Be in a non-UTC timezone (e.g., CEST / UTC+2)
- Run
openshell sandbox create --from base
- Run
openshell sandbox list
- Compare the CREATED timestamp with your local clock — it will be offset by your timezone difference from UTC
Environment
- OS: macOS (darwin-arm64)
- OpenShell: built from
main branch
Logs
# Local clock: 16:56 CEST (UTC+2)
# sandbox list shows:
NAME CREATED PHASE
apt-capelin 2026-07-01 14:56:41 Ready
# Expected:
apt-capelin 2026-07-01 16:56:41 Ready
Agent Diagnostic
Investigated timestamp formatting across CLI and TUI crates. Loaded skills:
create-github-issue,Explore(codebase search).Findings:
format_epoch_ms()incrates/openshell-cli/src/run.rs:169performs manual UTC arithmetic (secs / 86400,civil_from_days) to convert epoch milliseconds toYYYY-MM-DD HH:MM:SS. This always produces UTC time-of-day components regardless of the user's local timezone.format_timestamp()incrates/openshell-tui/src/lib.rs:2484has the same pattern (days_to_ymdhelper).format_timestamp_ms()incrates/openshell-cli/src/run.rs:7823(audit log timestamps) also uses UTC arithmetic.format_age()in the TUI (relative time like "5m", "2h 30m") is not affected — it computes UTC-to-UTC differences correctly.chrono = "0.4"is already a dependency of the CLI crate; the TUI would need it added.sandbox_to_json,provider_to_json) also usesformat_epoch_ms, producing UTC strings with no timezone indicator.Description
Actual behavior:
openshell sandbox listdisplays the CREATED column in UTC. For users in non-UTC timezones, timestamps appear to be hours in the past. For example, in UTC+2 (CEST), a sandbox created at 16:56 local time shows as14:56:41, making it look like it was created 2 hours ago.Expected behavior: The CREATED column should display timestamps in the user's local timezone. JSON output (
--output json) should use ISO 8601 with timezone offset (e.g.,2026-07-01T16:56:41+02:00).Reproduction Steps
openshell sandbox create --from baseopenshell sandbox listEnvironment
mainbranchLogs