From 4696590a73fb3a07bedcdfec1b655bd32f1df815 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 28 Jul 2009 17:16:13 +0200 Subject: [PATCH] Create SDATE, similar to DDATE and CDATE Signed-off-by: Nico Schottelius --- ccollect.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ccollect.sh b/ccollect.sh index 54ac550..d3f1737 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -51,6 +51,7 @@ FULL_VERSION="ccollect ${VERSION} (${RELEASE})" # CDATE="date +%Y%m%d-%H%M" DDATE="date +%Y-%m-%d-%H:%M:%S" +SDATE="date +%s" # # unset values @@ -271,7 +272,7 @@ while [ "${i}" -lt "${no_sources}" ]; do # # Record start of backup: internal and for the user # - begin_s="$(date +%s)" + begin_s="$(${SDATE})" _techo "Beginning to backup" # @@ -556,7 +557,7 @@ while [ "${i}" -lt "${no_sources}" ]; do fi # Calculation - end_s="$(date +%s)" + end_s="$(${SDATE})" full_seconds="$((${end_s} - ${begin_s}))" hours="$((${full_seconds} / 3600))"