From 17171aecf449c0f0823d7843242d735caaad7739 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sat, 16 May 2020 08:50:58 -0400 Subject: 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 --- libpod/define/version.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libpod/define') 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 -- cgit v1.2.3-54-g00ecf