Repository navigation
fix: show absolute dates as UTC RFC 3339 everywhere - #72
Merged
Merged
Conversation
Projects, environments and webhooks rendered dates in local time with no
zone, secrets metadata printed raw API strings, and agent Docker networks
printed Go's time.Time string. All now go through one formatter
(`2026-10-09T07:57:15Z`), matching what `agent sessions` already showed.
Docker network times are read with `{{json .Created}}`, which works
whether the CLI exposes `.Created` as a string or a time.Time, and fall
back to Docker's raw value if it doesn't parse.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Absolute dates were shown in four different ways across the CLI. They now all use one format, UTC RFC 3339 with whole seconds and a
Z(e.g.2026-10-09T07:57:15Z), which matches whatagent sessionsalready printed.2026-10-09 09:57(local time, no zone)2026-10-09T07:57:15Z(relative "x ago" kept in detail views)2026-09-13T11:53:59.237435+00:00(raw API string)2026-09-13T11:53:59Zagent docker status/cleanup2026-10-09 09:57:15.791491833 +0200 CEST(Gotime.Timestring)2026-10-09T07:57:15Zagent sessions2026-09-13T11:53:59ZChanges
utils/human_datetime.rs: sharedformat_utc/format_utc_timestamp(moved fromagent/sessions.rs), plusdisplay_utc_timestamp, which leaves values it can't parse (e.g. an emptylast_accessed_at) unchanged.get_human_datetimenow formats in UTC instead ofLocal.created_atis read with{{json .Created}}, which works whether the Docker CLI exposes.Createdas atime.Timeor a string. It's normalized to UTC and falls back to Docker's raw value if it doesn't parse.Notes
--jsonoutput from the REST API is unchanged; the API already returns UTC, and it's passed through as-is.agent docker status --jsoncreated_atnow uses the normalized UTC value instead of Docker's raw string.Test plan
cargo fmt --checkcargo test(594 + 25 + 33 passed), including new tests for UTC formatting, local-timezone independence, the unparseable fallback, and DockerCreatednormalization{{json .Created}}against a real Docker network (CLI 28.5.1 / engine 29.4.0)