date -d and locales don't mix: SOLR-136

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@556910 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
William Au 2007-07-17 12:51:00 +00:00
parent b4f9463a6e
commit 1ea6384ff0
1 changed files with 2 additions and 2 deletions

View File

@ -223,7 +223,7 @@ logMessage pulling snapshot ${name}
ssh -o StrictHostKeyChecking=no ${master_host} mkdir -p ${master_status_dir}
# start new distribution stats
rsyncStart=`date`
rsyncStart=`date +'%Y-%m-%d %H:%M:%S'`
startTimestamp=`date -d "$rsyncStart" +'%Y%m%d-%H%M%S'`
rsyncStartSec=`date -d "$rsyncStart" +'%s'`
startStatus="rsync of `basename ${name}` started:$startTimestamp"
@ -235,7 +235,7 @@ rsync -Wa${verbose}${compress} --delete ${sizeonly} \
${stats} rsync://${master_host}:${rsyncd_port}/solr/${name}/ ${data_dir}/${name}-wip
rc=$?
rsyncEnd=`date`
rsyncEnd=`date +'%Y-%m-%d %H:%M:%S'`
endTimestamp=`date -d "$rsyncEnd" +'%Y%m%d-%H%M%S'`
rsyncEndSec=`date -d "$rsyncEnd" +'%s'`
elapsed=`expr $rsyncEndSec - $rsyncStartSec`