From 5063d1aad73dc796293d1261fa6c3fa260cd6fbe Mon Sep 17 00:00:00 2001 From: FloezeTv Date: Sun, 15 Jun 2025 14:03:10 +0200 Subject: [PATCH] Fix default until-date in other locales The default until-date used `date` with the system's default locale as `date` produces localized output by default. However, `date -d` cannot parse this localized output but requires a locale independent format: https://www.gnu.org/software/coreutils/manual/html_node/Options-for-date.html#index-_002dd-19 This sets the locale to a format parsable by `date` as in the article. --- git-quick-stats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-quick-stats b/git-quick-stats index b1ebbcc..72bb501 100755 --- a/git-quick-stats +++ b/git-quick-stats @@ -27,7 +27,7 @@ _until=${_GIT_UNTIL:-} if [[ -n "${_until}" ]]; then _until="--until=$_until" else - _until="--until=$(date '+%a, %d %b %Y %H:%M:%S %Z')" + _until="--until=$(LC_TIME=C date '+%a, %d %b %Y %H:%M:%S %Z')" fi # Set files or directories to be excluded in stats