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>
This commit is contained in:
Lars Karlitski
2019-02-04 18:56:41 +01:00
parent 38e42476cb
commit 29392b77e9
5 changed files with 13 additions and 19 deletions

View File

@ -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,