Skip to content

Apache Lucene open-source search software

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

William Au1ea6384ff0b3
diff --git a/src/scripts/snappuller b/src/scripts/snappuller
index 74c98434e5d..46de8f49cbc 100755
--- a/src/scripts/snappuller
+++ b/src/scripts/snappuller
@@ -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`