From: intrigeri Date: Tue, 9 Dec 2008 11:08:53 +0000 (+0000) Subject: backupninja: do not assume English locale when using date (Closes: #465837) X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja-vserver.git;a=commitdiff_plain;h=da99638a2cce5ae6b7f0cfd402b05dd896eea783 backupninja: do not assume English locale when using date (Closes: #465837) git-svn-id: http://code.autistici.org/svn/backupninja/trunk@628 758a04ac-41e6-0310-8a23-8373a73cc35d --- diff --git a/ChangeLog b/ChangeLog index 2ca863d..d6292ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ version 0.9.7 -- UNRELEASED backupninja changes . fix bug in reportspace, thanks Dan Garthwaite + . do not assume English locale when using date (Closes: #465837) handler changes maildir: . fix location of deleted_on file diff --git a/src/backupninja.in b/src/backupninja.in index 25f4e11..6dee3b6 100755 --- a/src/backupninja.in +++ b/src/backupninja.in @@ -98,7 +98,7 @@ function printmsg() { function logmsg() { if [ -w "$logfile" ]; then - echo -e `date "+%h %d %H:%M:%S"` "$@" >> $logfile + echo -e `LC_ALL=C date "+%h %d %H:%M:%S"` "$@" >> $logfile fi } @@ -200,9 +200,9 @@ function toint() { # we grab the current time once, since processing # all the configs might take more than an hour. -nowtime=`date +%H` -nowday=`date +%d` -nowdayofweek=`date +%A` +nowtime=`LC_ALL=C date +%H` +nowday=`LC_ALL=C date +%d` +nowdayofweek=`LC_ALL=C date +%A` nowdayofweek=`tolower "$nowdayofweek"` function isnow() {