From 2dc03872845c43454b8e5b6a20d2cde3f6df30de Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Tue, 14 Sep 2021 15:01:15 +0200 Subject: [PATCH] The file timestamps.txt is always in Eastern Standard Time. --- build/stamp.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/stamp.sh b/build/stamp.sh index 52ca263f..23f4e688 100755 --- a/build/stamp.sh +++ b/build/stamp.sh @@ -1,10 +1,13 @@ #!/bin/sh # Update timestamps to those listed in the file passed as $1. +# Those timestamps are always in Eastern Standard Time. # If there's no timestamp, we take the latest git author date. list="$PWD/$1" +OTZ="$TZ" +export TZ timestamps(){ for i in */*; do @@ -13,8 +16,10 @@ timestamps(){ if test -n "$t"; then set -- $t t="$2" + TZ=EST else t=`git log -1 --date=format:%Y%m%d%H%M.%S --format=%cd -- "$1"` + TZ="$OTZ" fi touch -h -t "$t" -- "$i" done