From 708095abb00b1acab96ea934bdabb1187ffaf93a Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Debian Linux)" <rob@synchro.net>
Date: Thu, 7 Mar 2024 00:03:53 -0800
Subject: [PATCH] Zero-pad (instead of space-pad) the day of month in GIT_DATE

This is not consistent with __DATE__ macro expansion, but I like it better

Heck, now that we're not really logging the build date much of anywhere, we
could go with any other more sensible date format here.
---
 src/build/gitinfo.bat | 2 +-
 src/sbbs3/targets.mk  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/build/gitinfo.bat b/src/build/gitinfo.bat
index 9d9e8d62eb..99f05efaf2 100644
--- a/src/build/gitinfo.bat
+++ b/src/build/gitinfo.bat
@@ -1,5 +1,5 @@
 @git log -1 HEAD --format="#define GIT_HASH \"%%h\"" > git_hash.h
-@git log -1 HEAD --format="#define GIT_DATE \"%%cd\"" "--date=format-local:%%b %%e %%Y %%H:%%M" >> git_hash.h
+@git log -1 HEAD --format="#define GIT_DATE \"%%cd\"" "--date=format-local:%%b %%d %%Y %%H:%%M" >> git_hash.h
 @echo #define GIT_BRANCH ^"| tr -d "\r\n" > git_branch.h
 @git rev-parse --abbrev-ref HEAD | tr -d "\n" >> git_branch.h
 @echo ^" >> git_branch.h
diff --git a/src/sbbs3/targets.mk b/src/sbbs3/targets.mk
index 777d5450dc..0dc2782d17 100644
--- a/src/sbbs3/targets.mk
+++ b/src/sbbs3/targets.mk
@@ -158,7 +158,7 @@ FORCE:
 ifneq ($(GIT), NO)
 git_hash.h: FORCE ../../.git
 	$(QUIET)git log -1 HEAD --format="#define GIT_HASH \"%h\"" > $@.tmp
-	$(QUIET)git log -1 HEAD --format="#define GIT_DATE \"%cd\"" '--date=format-local:%b %e %Y %H:%M' >> $@.tmp
+	$(QUIET)git log -1 HEAD --format="#define GIT_DATE \"%cd\"" '--date=format-local:%b %d %Y %H:%M' >> $@.tmp
 	$(QUIET)test -e $@ && diff $@.tmp $@ || cp $@.tmp $@
 	$(QUIET)rm -f $@.tmp
 
-- 
GitLab