secret list, secret version list, secret unlocker list and secret info printed times in the machine's time zone without naming it. Entry() now sets time.Local to UTC before anything else, as AGENTS.md policy 6 asks, so every printed time is UTC and --json times end in Z. The README says so at the top of the Commands Reference.
What the diff does not show: the same line changes what the program writes. Times stored in version and unlocker metadata are UTC, and a new version's name takes the UTC date, so a secret added at 21:00 in New York in winter gets the next day's date. The README says that too.
The test sets the secret's current file to 03:04:05 UTC on 2 January and runs the built secret list, plain and with --json, under TZ=America/New_York, where that time is 22:04:05 the day before.
Rule suppressed: gosmopolitan, which flags any use of time.Local, on the one line that sets it.
Unverified: on a machine where Go finds no New York zone data, neither the system's nor its own copy, Go uses UTC for TZ=America/New_York and the test cannot fail.
An existing test calls Entry() in-process, so the test process runs in UTC after it.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/secret/issues/169.
`secret list`, `secret version list`, `secret unlocker list` and `secret info` printed times in the machine's time zone without naming it. `Entry()` now sets `time.Local` to UTC before anything else, as `AGENTS.md` policy 6 asks, so every printed time is UTC and `--json` times end in `Z`. The README says so at the top of the Commands Reference.
What the diff does not show: the same line changes what the program writes. Times stored in version and unlocker metadata are UTC, and a new version's name takes the UTC date, so a secret added at 21:00 in New York in winter gets the next day's date. The README says that too.
The test sets the secret's `current` file to 03:04:05 UTC on 2 January and runs the built `secret list`, plain and with `--json`, under `TZ=America/New_York`, where that time is 22:04:05 the day before.
Rule suppressed: gosmopolitan, which flags any use of `time.Local`, on the one line that sets it.
Unverified: on a machine where Go finds no New York zone data, neither the system's nor its own copy, Go uses UTC for `TZ=America/New_York` and the test cannot fail.
An existing test calls `Entry()` in-process, so the test process runs in UTC after it.
Model: opus-5-5
secret list, secret version list, secret unlocker list and secret info
printed times in the machine's time zone without naming it, so one vault
showed different times on two machines. Entry() now sets time.Local to
UTC before anything else, as AGENTS.md policy 6 asks, so every time the
program prints or writes is in UTC: --json times end in Z, and a new
version's name takes the UTC date. The README says so.
A test runs the built secret list with TZ=America/New_York and checks the
table and the JSON against the UTC time set on the secret's current file.
Rule suppressed: gosmopolitan, which flags any use of time.Local.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #169.
secret list,secret version list,secret unlocker listandsecret infoprinted times in the machine's time zone without naming it.Entry()now setstime.Localto UTC before anything else, asAGENTS.mdpolicy 6 asks, so every printed time is UTC and--jsontimes end inZ. The README says so at the top of the Commands Reference.What the diff does not show: the same line changes what the program writes. Times stored in version and unlocker metadata are UTC, and a new version's name takes the UTC date, so a secret added at 21:00 in New York in winter gets the next day's date. The README says that too.
The test sets the secret's
currentfile to 03:04:05 UTC on 2 January and runs the builtsecret list, plain and with--json, underTZ=America/New_York, where that time is 22:04:05 the day before.Rule suppressed: gosmopolitan, which flags any use of
time.Local, on the one line that sets it.Unverified: on a machine where Go finds no New York zone data, neither the system's nor its own copy, Go uses UTC for
TZ=America/New_Yorkand the test cannot fail.An existing test calls
Entry()in-process, so the test process runs in UTC after it.Model: opus-5-5
Review passed.
Model: opus-5-5