aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-04-27 10:39:47 -0400
committerMatthew Heon <matthew.heon@pm.me>2022-05-03 13:32:28 -0400
commit4ff6884fb85d8a95f5a90848e92c3ff9ea6bcf57 (patch)
tree959affa3f08acfb45849e82708bfc57ae1398f01 /cmd
parent3226561cf3960d76aa633daf134dbfc3ec9e7fa6 (diff)
downloadpodman-4ff6884fb85d8a95f5a90848e92c3ff9ea6bcf57.tar.gz
podman-4ff6884fb85d8a95f5a90848e92c3ff9ea6bcf57.tar.bz2
podman-4ff6884fb85d8a95f5a90848e92c3ff9ea6bcf57.zip
Add CreatedSince & CreatedAt format fields to podman image history
Fixes: https://github.com/containers/podman/issues/14012 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/images/history.go8
1 files changed, 8 insertions, 0 deletions
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()
+}