From 1760c103ae0148a005db6a8fcba8800d02396702 Mon Sep 17 00:00:00 2001 From: Piotr Halama Date: Sat, 30 Nov 2024 00:06:51 +0100 Subject: [PATCH 1/2] Fix date generation on non-english systems --- u-boot/tools/build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/u-boot/tools/build b/u-boot/tools/build index d543303..6f22d85 100755 --- a/u-boot/tools/build +++ b/u-boot/tools/build @@ -139,7 +139,7 @@ for dir in $WORK_QUEUE; do # Populate README.md cp tools/README.template $dir/README.md sed -i "s^%%URL%%^$URL^g" $dir/README.md - sed -i "s^%%DATE%%^$(date)^g" $dir/README.md + sed -i "s^%%DATE%%^$(TZ=UTC LANG=en_us date)^g" $dir/README.md sed -i "s^%%GIT_REPO%%^$GIT_REPO^g" $dir/README.md sed -i "s^%%GIT_DATE%%^$GIT_DATE^g" $dir/README.md sed -i "s^%%GIT_HASH%%^$GIT_HASH^g" $dir/README.md From 8740ae0cf1e6f3b90202cebf20c548f5d1eaca16 Mon Sep 17 00:00:00 2001 From: Piotr Halama Date: Sat, 30 Nov 2024 00:21:17 +0100 Subject: [PATCH 2/2] adjust both dates to use UTC timezone --- u-boot/tools/build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/u-boot/tools/build b/u-boot/tools/build index 6f22d85..9e1da75 100755 --- a/u-boot/tools/build +++ b/u-boot/tools/build @@ -67,7 +67,7 @@ if [ $# -ge 2 ]; then fi echo "Calculating dates..." -GIT_DATE=$(git -C $TMP log -1 --format=%cd) +GIT_DATE=$(TZ=UTC0 git -C $TMP log -1 --date=local --format=%cd) GIT_HASH=$(git -C $TMP log -1 --format=%H) echo "Locating work..." @@ -139,7 +139,7 @@ for dir in $WORK_QUEUE; do # Populate README.md cp tools/README.template $dir/README.md sed -i "s^%%URL%%^$URL^g" $dir/README.md - sed -i "s^%%DATE%%^$(TZ=UTC LANG=en_us date)^g" $dir/README.md + sed -i "s^%%DATE%%^$(TZ=UTC0 LANG=en_us date)^g" $dir/README.md sed -i "s^%%GIT_REPO%%^$GIT_REPO^g" $dir/README.md sed -i "s^%%GIT_DATE%%^$GIT_DATE^g" $dir/README.md sed -i "s^%%GIT_HASH%%^$GIT_HASH^g" $dir/README.md