Create SDATE, similar to DDATE and CDATE

Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
Nico Schottelius 2009-07-28 17:16:13 +02:00
parent ba11374c6f
commit 4696590a73

View file

@ -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))"