From 121c12b5e40995eacaccad30b4d212882ce049c0 Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Thu, 5 May 2022 16:15:06 +0200 Subject: [PATCH] Readd BuildTimeUnix --- internal/pkg/overlay/datastructure.go | 1 + internal/pkg/overlay/overlay.go | 1 + 2 files changed, 2 insertions(+) diff --git a/internal/pkg/overlay/datastructure.go b/internal/pkg/overlay/datastructure.go index 289106ab..70e5f79b 100644 --- a/internal/pkg/overlay/datastructure.go +++ b/internal/pkg/overlay/datastructure.go @@ -26,6 +26,7 @@ type TemplateStruct struct { AllNodes []node.NodeInfo BuildHost string BuildTime string + BuildTimeUnix string BuildSource string Ipaddr string Ipaddr6 string diff --git a/internal/pkg/overlay/overlay.go b/internal/pkg/overlay/overlay.go index 1524d8a3..1e2d1316 100644 --- a/internal/pkg/overlay/overlay.go +++ b/internal/pkg/overlay/overlay.go @@ -300,6 +300,7 @@ func BuildOverlayIndir(nodeInfo node.NodeInfo, overlayNames []string, outputDir tstruct.BuildHost = hostname dt := time.Now() tstruct.BuildTime = dt.Format("01-02-2006 15:04:05 MST") + tstruct.BuildTimeUnix = strconv.FormatInt(dt.Unix(), 10) for _, overlayName := range overlayNames { wwlog.Printf(wwlog.VERBOSE, "Building overlay %s for node %s in %s\n", overlayName, nodeInfo.Id.Get(), outputDir) overlaySourceDir := OverlaySourceDir(overlayName)