Fix build-date to use UTC

Signed-off-by: Mark Anderson <manderson@hashicorp.com>
This commit is contained in:
Mark Anderson 2022-06-02 11:52:30 -07:00
parent 18d3cee29e
commit 961e069556
1 changed files with 1 additions and 1 deletions

View File

@ -299,7 +299,7 @@ function git_date {
# it's tricky to do an RFC3339 format in a cross platform way, so we hardcode UTC
local date_format="%Y-%m-%dT%H:%M:%SZ"
# we're using this for build date because it's stable across platform builds
local date="$(git show -s --format=%cd --date=format:"$date_format" HEAD)" || ret=1
local date="$(TZ=UTC0 git show -s --format=%cd --date=format-local:"$date_format" HEAD)" || ret=1
##local head="$(git status -b --porcelain=v2 | awk '{if ($1 == "#" && $2 =="branch.head") { print $3 }}')" || ret=1