Add BuildTimeUnix containing Unix time (seconds since epoch).

This commit is contained in:
griznog
2022-04-15 10:36:40 -05:00
parent c29848171e
commit bada0f738b
2 changed files with 2 additions and 0 deletions

View File

@@ -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)