Description
I have one server running Docker CE 28.5.1, when I run docker version --format=json it prints:
{"Client":{"Platform":{"Name":"Docker Engine - Community"},"Version":"28.5.1","ApiVersion":"1.51","DefaultAPIVersion":"1.51","GitCommit":"e180ab8","GoVersion":"go1.24.8","Os":"linux","Arch":"amd64","BuildTime":"Wed Oct 8 12:19:17 2025","Context":"default"},"Server":{"Platform":{"Name":"Docker Engine - Community"},"Components":[{"Name":"Engine","Version":"28.5.1","Details":{"ApiVersion":"1.51","Arch":"amd64","BuildTime":"Wed Oct 8 12:16:44 2025","Experimental":"false","GitCommit":"f8215cc","GoVersion":"go1.24.8","KernelVersion":"4.18.0-553.74.1.el8_10.x86_64","MinAPIVersion":"1.24","Os":"linux"}},{"Name":"containerd","Version":"v1.7.28","Details":{"GitCommit":"b98a3aace656320842a23f4a392a33f46af97866"}},{"Name":"runc","Version":"1.3.0","Details":{"GitCommit":"v1.3.0-0-g4ca628d1"}},{"Name":"docker-init","Version":"0.19.0","Details":{"GitCommit":"de40ad0"}}],"Version":"28.5.1","ApiVersion":"1.51","MinAPIVersion":"1.24","GitCommit":"f8215cc","GoVersion":"go1.24.8","Os":"linux","Arch":"amd64","KernelVersion":"4.18.0-553.74.1.el8_10.x86_64","BuildTime":"2025-10-08T12:16:44.000000000+00:00"}}
Note the "BuildTime" is in ISO8601 format (I think technically RFC3339Nano).
I have another server running Docker CE 29.0.1, when I run docker version --format=json it prints:
{"Client":{"Platform":{"Name":"Docker Engine - Community"},"Version":"29.0.1","ApiVersion":"1.52","DefaultAPIVersion":"1.52","GitCommit":"eedd969","GoVersion":"go1.25.4","Os":"linux","Arch":"amd64","BuildTime":"Fri Nov 14 16:20:00 2025","Context":"default"},"Server":{"Platform":{"Name":"Docker Engine - Community"},"Version":"29.0.1","ApiVersion":"1.52","MinAPIVersion":"1.44","Os":"linux","Arch":"amd64","Components":[{"Name":"Engine","Version":"29.0.1","Details":{"ApiVersion":"1.52","Arch":"amd64","BuildTime":"Fri Nov 14 16:17:21 2025","Experimental":"false","GitCommit":"198b5e3","GoVersion":"go1.25.4","KernelVersion":"4.18.0-553.74.1.el8_10.x86_64","MinAPIVersion":"1.44","Os":"linux"}},{"Name":"containerd","Version":"v2.1.5","Details":{"GitCommit":"fcd43222d6b07379a4be9786bda52438f0dd16a1"}},{"Name":"runc","Version":"1.3.3","Details":{"GitCommit":"v1.3.3-0-gd842d771"}},{"Name":"docker-init","Version":"0.19.0","Details":{"GitCommit":"de40ad0"}}],"GitCommit":"198b5e3","GoVersion":"go1.25.4","KernelVersion":"4.18.0-553.74.1.el8_10.x86_64","BuildTime":"Fri Nov 14 16:17:21 2025"}}
Note the "BuildTime" format has changed, it is now in ctime/asctime format instead of RFC3339Nano. I'm not sure what motivated this change, and it means scripts that want to parse this output now have to deal with two incompatible formats depending on Docker version. The previous RFC3339Nano is generally easier to parse from scripts. I checked 29.0.2 as well, it has the same change.
Note even in 29.0.2, if I check the API manually using curl -Ss --unix-socket /var/run/docker.sock http://localhost/v1.52/version I get:
{"Platform":{"Name":"Docker Engine - Community"},"Version":"29.0.2","ApiVersion":"1.52","MinAPIVersion":"1.44","Os":"linux","Arch":"amd64","Components":[{"Name":"Engine","Version":"29.0.2","Details":{"ApiVersion":"1.52","Arch":"amd64","BuildTime":"2025-11-17T12:33:03.000000000+00:00","Experimental":"false","GitCommit":"e9ff10b","GoVersion":"go1.25.4","KernelVersion":"4.18.0-553.74.1.el8_10.x86_64","MinAPIVersion":"1.44","Os":"linux"}},{"Name":"containerd","Version":"v2.1.5","Details":{"GitCommit":"fcd43222d6b07379a4be9786bda52438f0dd16a1"}},{"Name":"runc","Version":"1.3.3","Details":{"GitCommit":"v1.3.3-0-gd842d771"}},{"Name":"docker-init","Version":"0.19.0","Details":{"GitCommit":"de40ad0"}}],"GitCommit":"e9ff10b","GoVersion":"go1.25.4","KernelVersion":"4.18.0-553.74.1.el8_10.x86_64","BuildTime":"2025-11-17T12:33:03.000000000+00:00"}
So the raw data being returned by the daemon has not changed – for some reason the CLI is converting the date format, when it didn't used to do that.
Was this a deliberate or accidental change? If deliberate, what was the rationale? Any chance it could be reverted in future versions?
Reproduce
- Run
docker version --format=json
- Observe
"BuildTime" key
Expected behavior
Date format of "BuildTime" key should use same ISO 8601 format as it used in Docker CE 28.x and earlier
docker version
Client: Docker Engine - Community
Version: 29.0.2
API version: 1.52
Go version: go1.25.4
Git commit: 8108357
Built: Mon Nov 17 12:35:47 2025
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 29.0.2
API version: 1.52 (minimum version 1.44)
Go version: go1.25.4
Git commit: e9ff10b
Built: Mon Nov 17 12:33:03 2025
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v2.1.5
GitCommit: fcd43222d6b07379a4be9786bda52438f0dd16a1
runc:
Version: 1.3.3
GitCommit: v1.3.3-0-gd842d771
docker-init:
Version: 0.19.0
GitCommit: de40ad0
docker info
Additional Info
No response
Description
I have one server running Docker CE 28.5.1, when I run
docker version --format=jsonit prints:Note the
"BuildTime"is in ISO8601 format (I think technically RFC3339Nano).I have another server running Docker CE 29.0.1, when I run
docker version --format=jsonit prints:Note the
"BuildTime"format has changed, it is now in ctime/asctime format instead of RFC3339Nano. I'm not sure what motivated this change, and it means scripts that want to parse this output now have to deal with two incompatible formats depending on Docker version. The previous RFC3339Nano is generally easier to parse from scripts. I checked 29.0.2 as well, it has the same change.Note even in 29.0.2, if I check the API manually using
curl -Ss --unix-socket /var/run/docker.sock http://localhost/v1.52/versionI get:So the raw data being returned by the daemon has not changed – for some reason the CLI is converting the date format, when it didn't used to do that.
Was this a deliberate or accidental change? If deliberate, what was the rationale? Any chance it could be reverted in future versions?
Reproduce
docker version --format=json"BuildTime"keyExpected behavior
Date format of
"BuildTime"key should use same ISO 8601 format as it used in Docker CE 28.x and earlierdocker version
Client: Docker Engine - Community Version: 29.0.2 API version: 1.52 Go version: go1.25.4 Git commit: 8108357 Built: Mon Nov 17 12:35:47 2025 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 29.0.2 API version: 1.52 (minimum version 1.44) Go version: go1.25.4 Git commit: e9ff10b Built: Mon Nov 17 12:33:03 2025 OS/Arch: linux/amd64 Experimental: false containerd: Version: v2.1.5 GitCommit: fcd43222d6b07379a4be9786bda52438f0dd16a1 runc: Version: 1.3.3 GitCommit: v1.3.3-0-gd842d771 docker-init: Version: 0.19.0 GitCommit: de40ad0docker info
Additional Info
No response