From 24a919aea1749cd1322c94b9caab9ccbbd17b00c Mon Sep 17 00:00:00 2001 From: Alex Palaistras Date: Wed, 22 Sep 2021 22:37:17 +0100 Subject: [PATCH] hooks/post-merge: Use local time for `git log` Otherwise, commit timestamps may end up being in the future from the perspective of a server that runs on UTC. --- hooks/post-merge | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/post-merge b/hooks/post-merge index 5f6b1ce..e8fc12e 100755 --- a/hooks/post-merge +++ b/hooks/post-merge @@ -43,7 +43,7 @@ function sync-coreos-config() { continue fi - touch -t "$(cd "$dir" && git log -n 1 --pretty=format:%cd --date=format:%Y%m%d%H%M.%S --date-order -- "$f")" -- "$f" + touch -t "$(cd "$dir" && git log -n 1 --pretty=format:%cd --date=format-local:%Y%m%d%H%M.%S --date-order -- "$f")" -- "$f" done # Copy files from temporary directory to host configuration directory.