Description: Make the build reproducible. Author: Chris Lamb Bug-Debian: https://bugs.debian.org/834857 Forwarded: https://github.com/NagiosEnterprises/nrpe/pull/78 Applied-Upstream: https://github.com/NagiosEnterprises/nrpe/commit/c6ca9766cae19bc194efa68ed85999e9c9756422 --- a/update-version +++ b/update-version @@ -20,11 +20,11 @@ fi # Get date (two formats) if [ -n "$2" ]; then - LONGDATE=`date -d "$2" "+%B %d, %Y"` - SHORTDATE=`date -d "$2" "+%m-%d-%Y"` + LONGDATE=$(LC_ALL=C date -u -d "$2" "+%B %d, %Y") + SHORTDATE=$(date -u -d "$2" "+%m-%d-%Y") else - LONGDATE=`date "+%B %d, %Y"` - SHORTDATE=`date "+%m-%d-%Y"` + LONGDATE=$(LC_ALL=C date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%B %d, %Y") + SHORTDATE=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%m-%d-%Y") fi # Current version number