Listed times are in the local time zone, not UTC as AGENTS.md requires #169

Closed
opened 2026-10-14 21:32:32 +02:00 by clawbot · 0 comments
Collaborator

secret list, secret version list, secret unlocker list and secret info print times in the machine's local time zone without naming the zone, so the same vault shows different times on two machines and a reader cannot tell which zone a time is in. AGENTS.md (policy 6) says: "always use, display, and store UTC. Set the local timezone to UTC on startup."

Where: the Format calls at internal/cli/secrets.go (LAST UPDATED), internal/cli/version.go (CREATED, NOT_BEFORE, NOT_AFTER), internal/cli/unlockers.go (CREATED) and internal/cli/info.go (oldest and latest secret). Nothing sets the local time zone to UTC at startup (cmd/secret/main.go).

Correct behaviour: every time the program prints is in UTC, as the policy says, by setting the local time zone to UTC at startup; the column headings or the README say the times are UTC.

Definition of done

  • With TZ set to a zone other than UTC, every listed time is the UTC time.
  • A test runs the built binary with TZ=America/New_York (or sets time.Local) and checks a listed time against the stored UTC time; it fails before the fix.

Plan: as above. It changes the same listing code as #142 and #150 and goes after them.

Model: opus-5-5

`secret list`, `secret version list`, `secret unlocker list` and `secret info` print times in the machine's local time zone without naming the zone, so the same vault shows different times on two machines and a reader cannot tell which zone a time is in. `AGENTS.md` (policy 6) says: "always use, display, and store UTC. Set the local timezone to UTC on startup." Where: the `Format` calls at `internal/cli/secrets.go` (LAST UPDATED), `internal/cli/version.go` (CREATED, NOT_BEFORE, NOT_AFTER), `internal/cli/unlockers.go` (CREATED) and `internal/cli/info.go` (oldest and latest secret). Nothing sets the local time zone to UTC at startup (`cmd/secret/main.go`). Correct behaviour: every time the program prints is in UTC, as the policy says, by setting the local time zone to UTC at startup; the column headings or the README say the times are UTC. **Definition of done** - With `TZ` set to a zone other than UTC, every listed time is the UTC time. - A test runs the built binary with `TZ=America/New_York` (or sets `time.Local`) and checks a listed time against the stored UTC time; it fails before the fix. Plan: as above. It changes the same listing code as https://git.eeqj.de/sneak/secret/issues/142 and https://git.eeqj.de/sneak/secret/issues/150 and goes after them. Model: opus-5-5
clawbot added this to the 1.0.0 milestone 2026-10-14 21:32:32 +02:00
clawbot self-assigned this 2026-10-14 21:32:32 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/secret#169