Skip to content

version: keep consistent RFC3339 BuildTime for --format json - #7174

Open
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:fix/version-buildtime-consistent
Open

version: keep consistent RFC3339 BuildTime for --format json#7174
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:fix/version-buildtime-consistent

Conversation

@locker95

Copy link
Copy Markdown

docker version --format json was mixing timestamp layouts in one document: Client / component Details used ANSIC via reformatDate, while Server.BuildTime kept the raw RFC3339 value from the Engine component (and never got the reformatted string).

For json / {{json .}}, skip reformatting so BuildTime fields stay ISO-8601. Default human output is unchanged (ANSIC), and Server.BuildTime now matches the Engine component detail after reformat.

Fixes #6727

Server.BuildTime previously kept the raw Engine detail string while
Components[].Details.BuildTime was reformatted to ANSIC, so the same
JSON document mixed layouts. Skip reformat for json output so Client,
Server, and component BuildTime stay as ISO-8601; human templates still
get ANSIC.

Fixes docker#6727

Signed-off-by: Dean Chen <862469039@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docker version JSON output uses mixed timestamp formats, seems to break downstream parsers (like VSCode DevContainers in remote configuration)

1 participant