Fix build-date to use UTC

Signed-off-by: Mark Anderson <manderson@hashicorp.com>
pull/13357/head
Mark Anderson 3 years ago
parent 19c87be3a6
commit 9343e05498

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

Loading…
Cancel
Save