From 1ea6384ff0b31abbb2c8481032051e602c67f3d5 Mon Sep 17 00:00:00 2001 From: William Au Date: Tue, 17 Jul 2007 12:51:00 +0000 Subject: [PATCH] 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 --- src/scripts/snappuller | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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`