Skip to content

Commit

Permalink
Nicer string formatting code...
Browse files Browse the repository at this point in the history
  • Loading branch information
nikmagini committed Sep 21, 2015
1 parent d072087 commit 53ad277
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions DataPopularity/popdb.crab/collector/lib/cronPopDB.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,10 @@ while [ $startHour -lt 24 ]; do

endHour=$((startHour+window))

startHourStr=0$startHour
startHourStr=${startHourStr: -2}

endHourStr=0$endHour
endHourStr=${endHourStr: -2}

startDate="`date -d '-1 day' +\%Y-\%m-\%d` "$startHourStr":00:00"
startDate="`date -d '-1 day' +\%Y-\%m-\%d` "$(printf %02d $startHour)":00:00"

if [ $endHour -lt 24 ]; then
endDate="`date -d '-1 day' +\%Y-\%m-\%d` "$endHourStr":00:00"
endDate="`date -d '-1 day' +\%Y-\%m-\%d` "$(printf %02d $endHour)":00:00"
else
endDate="`date +\%Y-\%m-\%d` 00:00:00"
fi
Expand Down
2 changes: 1 addition & 1 deletion DataPopularity/popdb.crab/collector/module.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = popularity-crab-cron
author = CERN IT-SDC (was IT-ES) CMS Data Popularity Team
author_email = [email protected]
url = ''
version = 0.2.0
version = 0.2.2
long_description = CMS Data Popularity Collection service to collect the usage of CMS official data from CRAB reports
description = CMS Data Popularity Collection service for CRAB reports

0 comments on commit 53ad277

Please sign in to comment.