summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/util.go
diff options
context:
space:
mode:
authorLars Karlitski <lars@karlitski.net>2019-02-04 18:56:41 +0100
committerLars Karlitski <lars@karlitski.net>2019-02-12 14:47:49 +0100
commit29392b77e90b59e6f7b7d78db78c9c0ae045bc06 (patch)
tree74f6465ab04f1e2bb2248b67ff06a566c0c3e9b9 /pkg/varlinkapi/util.go
parent38e42476cba14515cd2dbc53318ff1882a94b1c5 (diff)
downloadpodman-29392b77e90b59e6f7b7d78db78c9c0ae045bc06.tar.gz
podman-29392b77e90b59e6f7b7d78db78c9c0ae045bc06.tar.bz2
podman-29392b77e90b59e6f7b7d78db78c9c0ae045bc06.zip
varlink: Return all times in RFC 3339 format
This is more consistent and eaiser to parse than the format that golang's time.String() returns. Fixes #2260 Signed-off-by: Lars Karlitski <lars@karlitski.net>
Diffstat (limited to 'pkg/varlinkapi/util.go')
-rw-r--r--pkg/varlinkapi/util.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/varlinkapi/util.go b/pkg/varlinkapi/util.go
index a80c8db41..51891e729 100644
--- a/pkg/varlinkapi/util.go
+++ b/pkg/varlinkapi/util.go
@@ -61,7 +61,7 @@ func makeListContainer(containerID string, batchInfo shared.BatchContainerStruct
Image: batchInfo.ConConfig.RootfsImageName,
Imageid: batchInfo.ConConfig.RootfsImageID,
Command: batchInfo.ConConfig.Spec.Process.Args,
- Createdat: batchInfo.ConConfig.CreatedTime.String(),
+ Createdat: batchInfo.ConConfig.CreatedTime.Format(time.RFC3339),
Runningfor: time.Since(batchInfo.ConConfig.CreatedTime).String(),
Status: batchInfo.ConState.String(),
Ports: ports,
@@ -107,7 +107,7 @@ func makeListPod(pod *libpod.Pod, batchInfo shared.PsOptions) (iopodman.ListPodD
listPodsContainers = append(listPodsContainers, makeListPodContainers(ctr.ID(), batchInfo))
}
listPod := iopodman.ListPodData{
- Createdat: pod.CreatedTime().String(),
+ Createdat: pod.CreatedTime().Format(time.RFC3339),
Id: pod.ID(),
Name: pod.Name(),
Status: status,