summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/images.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/images.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/images.go')
-rw-r--r--pkg/varlinkapi/images.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go
index 6463d9edb..ecf4d331c 100644
--- a/pkg/varlinkapi/images.go
+++ b/pkg/varlinkapi/images.go
@@ -57,7 +57,7 @@ func (i *LibpodAPI) ListImages(call iopodman.VarlinkCall) error {
ParentId: image.Parent,
RepoTags: image.Names(),
RepoDigests: repoDigests,
- Created: image.Created().String(),
+ Created: image.Created().Format(time.RFC3339),
Size: int64(*size),
VirtualSize: image.VirtualSize,
Containers: int64(len(containers)),
@@ -97,7 +97,7 @@ func (i *LibpodAPI) GetImage(call iopodman.VarlinkCall, name string) error {
ParentId: newImage.Parent,
RepoTags: newImage.Names(),
RepoDigests: repoDigests,
- Created: newImage.Created().String(),
+ Created: newImage.Created().Format(time.RFC3339),
Size: int64(*size),
VirtualSize: newImage.VirtualSize,
Containers: int64(len(containers)),
@@ -309,7 +309,7 @@ func (i *LibpodAPI) HistoryImage(call iopodman.VarlinkCall, name string) error {
for _, hist := range history {
imageHistory := iopodman.ImageHistory{
Id: hist.ID,
- Created: hist.Created.String(),
+ Created: hist.Created.Format(time.RFC3339),
CreatedBy: hist.CreatedBy,
Tags: newImage.Names(),
Size: hist.Size,