bug: Sandbox timestamps display UTC instead of local time, causing 2-hour drift
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 8.7k
- Forks
- 1.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 253
Description
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.- JSON output (
sandbox_to_json,provider_to_json) also usesformat_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
mainbranch
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with format_epoch_ms() and format_timestamp_ms() in crates/openshell-cli/src/run.rs, then inspect format_timestamp() and format_age() in crates/openshell-tui/src/lib.rs. Reproduce the issue in a non-UTC timezone and verify that human-readable timestamps use local time, JSON uses ISO 8601 offsets, and relative ages remain unaffected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100