Improve output

This commit is contained in:
Philippe Caseiro 2022-03-24 14:04:07 +01:00
parent c563ba96f0
commit 5a00aee3f2

9
badgy
View File

@ -61,20 +61,21 @@ getCapitalTime()
sl=$(echo ${data} | jq -rc ".capitaltime")
dr=0
echo "Timers:"
echo "Timers :"
for cl in ${clocks}
do
starts=$(echo ${cl} | jq -rc ".start")
st=$(date --date="${starts}" +'%s')
ends=$(echo ${cl} | jq -rc ".end")
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
ed=$(date --date="${ends}" +'%s')
echo " End: $(date --date=${ends} +'%A %d %B %Y : %H:%M')"
echo " End: $(date --date=${ends} +'%H:%M')"
else
ed=$(date +'%s')
echo " End: running"
echo " End: running"
fi
dr=$(( dr + (ed - st)))
done