From 1fc64c8a5acdabfc08da29d45109085c3135df30 Mon Sep 17 00:00:00 2001 From: 3sky <3sky@protonmail.com> Date: Fri, 9 Oct 2020 16:57:07 +0200 Subject: Resolve #7860 - add time.RFC3339Nano into ContainerJSONBase Signed-off-by: 3sky <3sky@protonmail.com> --- pkg/api/handlers/compat/containers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/api/handlers/compat/containers.go b/pkg/api/handlers/compat/containers.go index 48ecfff5d..cae8f88fd 100644 --- a/pkg/api/handlers/compat/containers.go +++ b/pkg/api/handlers/compat/containers.go @@ -7,6 +7,7 @@ import ( "strconv" "strings" "syscall" + "time" "github.com/containers/podman/v2/libpod" "github.com/containers/podman/v2/libpod/define" @@ -316,7 +317,7 @@ func LibpodToContainerJSON(l *libpod.Container, sz bool) (*types.ContainerJSON, cb := types.ContainerJSONBase{ ID: l.ID(), - Created: l.CreatedTime().String(), + Created: l.CreatedTime().Format(time.RFC3339Nano), Path: "", Args: nil, State: &state, -- cgit v1.2.3-54-g00ecf