From dbef31b89adbafa264f824f05d9af6eee0c6f01c Mon Sep 17 00:00:00 2001
From: Markus Frosch <markus.frosch@icinga.com>
Date: Fri, 29 Nov 2019 10:52:04 +0100
Subject: [PATCH] release: Fix time locale for RPM

---
 icinga-build-release | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/icinga-build-release b/icinga-build-release
index 36965af..e4924b5 100755
--- a/icinga-build-release
+++ b/icinga-build-release
@@ -10,6 +10,8 @@ RPM_VERSION_REPLACE='\1'
 RPM_REVISION_RE='^(Release:\s+).*'
 RPM_REVISION_SUFFIX='%{?dist}'
 
+export LC_TIME=C
+
 error() {
   if [ -t 2 ]; then
     {
@@ -37,7 +39,7 @@ help() {
 }
 
 rpm_date() {
-  LANG=C echo "$(date +%A | sed -r 's~([a-z]{3}).*~\1~i')" "$(date +'%b %d %Y')"
+  echo "$(date +%A | sed -r 's~([a-z]{3}).*~\1~i')" "$(date +'%b %d %Y')"
 }
 
 if [ $# -ge 1 ]; then
@@ -121,7 +123,7 @@ if [ "$variant" = deb ]; then
   source_name="$(grep Source: debian/control | awk '{print $2}')"
   changelog="${source_name} (${full_version}) ${DCH_DIST}; urgency=medium"$'\n\n'
   changelog+="  * ${message}"$'\n'
-  changelog+=$'\n'" -- ${DEBFULLNAME} <${DEBEMAIL}>  $(LANG=C date -R)"$'\n\n'
+  changelog+=$'\n'" -- ${DEBFULLNAME} <${DEBEMAIL}>  $(date -R)"$'\n\n'
 
   # Insert into changelog
   echo -n "${changelog}" | cat - debian/changelog >debian/changelog.tmp
-- 
GitLab