NVIDIA / NVIDIA/OpenShell

bug: Sandbox timestamps display UTC instead of local time, causing 2-hour drift

Open
#2,106 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:cli area:tui state:pr-opened state:stale
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() 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

  1. Be in a non-UTC timezone (e.g., CEST / UTC+2)
  2. Run openshell sandbox create --from base
  3. Run openshell sandbox list
  4. 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.