Skip to content

Commit

Permalink
Fix date in log lines
Browse files Browse the repository at this point in the history
  • Loading branch information
florianbeer committed Apr 17, 2015
1 parent 1727ef1 commit c1fd8e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hactar
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ main() {
parse_commandline_arguments "$@"

declare -r start=$(date +%s)
logger -t hactar "Starting backup from \"${SOURCE}\" to \"${TARGET}\"`date -I"
logger -t hactar "Starting backup from \"${SOURCE}\" to \"${TARGET}`date -I`\""

run_backup

delete_oldest_backup

declare -r end=$(date +%s)
declare -r runtime=$(python -c "print '%u minutes %02u seconds' % ((${end} - ${start})/60, (${end} - ${start})%60)")
logger -t hactar "Backup from \"${SOURCE}\" to \"${TARGET}\"`date -I took ${runtime}"
logger -t hactar "Backup from \"${SOURCE}\" to \"${TARGET}`date -I`\" took ${runtime}"
}

main "$@"

0 comments on commit c1fd8e4

Please sign in to comment.