third_party/linux: use UTC timestamp
Previously, the build timestamp was generated in the local timezone,
which the date command reads from /etc/localtime. This meant that the
build was not reproducible across hosts with different timezones.
Now, it should always print the timestamp in UTC.
Change-Id: I696c1fa410fb3abf7918e861015566298250d541
Reviewed-on: https://review.monogon.dev/c/monogon/+/4443
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/third_party/linux/def.bzl b/third_party/linux/def.bzl
index 1ce6170..1f16d2e 100644
--- a/third_party/linux/def.bzl
+++ b/third_party/linux/def.bzl
@@ -118,7 +118,7 @@
export BISON_PKGDATADIR=$(realpath $(dirname $BISON)/../share/bison)
builddir=$(mktemp -d)
# All source files have the same timestamp, take it from an arbitrary file.
- build_timestamp=$(date -r {kernel_src}/README)
+ build_timestamp=$(date --utc -r {kernel_src}/README)
mkdir {kernel_src}/.bin
cp {kconfig} $builddir/.config