summaryrefslogtreecommitdiff
path: root/libpod/define
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-05-16 08:50:58 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-05-21 16:31:34 -0400
commit17171aecf449c0f0823d7843242d735caaad7739 (patch)
tree2c1f1055825ee4e3d3d493c510cabc0fddfb720e /libpod/define
parentf6aa620b05a057ca8fb9631b66313c6220de50c2 (diff)
downloadpodman-17171aecf449c0f0823d7843242d735caaad7739.tar.gz
podman-17171aecf449c0f0823d7843242d735caaad7739.tar.bz2
podman-17171aecf449c0f0823d7843242d735caaad7739.zip
Display human build date in podman info
Currently we are displaying the Seconds since EPOCH this will change to displaying date, similar to `podman version` Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod/define')
-rw-r--r--libpod/define/version.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/libpod/define/version.go b/libpod/define/version.go
index 954cd00f1..f37b9df41 100644
--- a/libpod/define/version.go
+++ b/libpod/define/version.go
@@ -3,6 +3,7 @@ package define
import (
"runtime"
"strconv"
+ "time"
podmanVersion "github.com/containers/libpod/version"
)
@@ -23,6 +24,7 @@ type Version struct {
Version string
GoVersion string
GitCommit string
+ BuiltTime string
Built int64
OsArch string
}
@@ -44,6 +46,7 @@ func GetVersion() (Version, error) {
Version: podmanVersion.Version,
GoVersion: runtime.Version(),
GitCommit: gitCommit,
+ BuiltTime: time.Unix(buildTime, 0).Format(time.ANSIC),
Built: buildTime,
OsArch: runtime.GOOS + "/" + runtime.GOARCH,
}, nil