From 22b421dd7e469b2015797ba93849474d39430994 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 27 Apr 2022 10:39:47 -0400 Subject: Add CreatedSince & CreatedAt format fields to podman image history Fixes: https://github.com/containers/podman/issues/14012 Signed-off-by: Daniel J Walsh --- cmd/podman/images/history.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cmd') diff --git a/cmd/podman/images/history.go b/cmd/podman/images/history.go index c05d3475b..26a4b6c3b 100644 --- a/cmd/podman/images/history.go +++ b/cmd/podman/images/history.go @@ -168,3 +168,11 @@ func (h historyReporter) ID() string { } return h.ImageHistoryLayer.ID } + +func (h historyReporter) CreatedAt() string { + return time.Unix(h.ImageHistoryLayer.Created.Unix(), 0).UTC().String() +} + +func (h historyReporter) CreatedSince() string { + return h.Created() +} -- cgit v1.2.3-54-g00ecf