Improve output
This commit is contained in:
parent
c563ba96f0
commit
5a00aee3f2
9
badgy
9
badgy
@ -61,20 +61,21 @@ getCapitalTime()
|
|||||||
sl=$(echo ${data} | jq -rc ".capitaltime")
|
sl=$(echo ${data} | jq -rc ".capitaltime")
|
||||||
dr=0
|
dr=0
|
||||||
|
|
||||||
echo "Timers:"
|
echo "Timers :"
|
||||||
for cl in ${clocks}
|
for cl in ${clocks}
|
||||||
do
|
do
|
||||||
starts=$(echo ${cl} | jq -rc ".start")
|
starts=$(echo ${cl} | jq -rc ".start")
|
||||||
st=$(date --date="${starts}" +'%s')
|
st=$(date --date="${starts}" +'%s')
|
||||||
ends=$(echo ${cl} | jq -rc ".end")
|
ends=$(echo ${cl} | jq -rc ".end")
|
||||||
echo
|
echo
|
||||||
echo " Start: $(date --date=${starts} +'%A %d %B %Y : %H:%M')"
|
echo " $(date --date=${starts} +"%A %d %B %Y:")"
|
||||||
|
echo " Start: $(date --date=${starts} +'%H:%M')"
|
||||||
if [ "${ends}" != "null" ];then
|
if [ "${ends}" != "null" ];then
|
||||||
ed=$(date --date="${ends}" +'%s')
|
ed=$(date --date="${ends}" +'%s')
|
||||||
echo " End: $(date --date=${ends} +'%A %d %B %Y : %H:%M')"
|
echo " End: $(date --date=${ends} +'%H:%M')"
|
||||||
else
|
else
|
||||||
ed=$(date +'%s')
|
ed=$(date +'%s')
|
||||||
echo " End: running"
|
echo " End: running"
|
||||||
fi
|
fi
|
||||||
dr=$(( dr + (ed - st)))
|
dr=$(( dr + (ed - st)))
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user