Fix errors on large uptimes

This commit is contained in:
Dylan Araps 2016-10-21 10:20:28 +11:00
parent fb7b3c146e
commit c2e6f6534d
1 changed files with 3 additions and 3 deletions

View File

@ -288,9 +288,9 @@ getuptime() {
;;
esac
days="$((seconds / 86400)) days"
hours="$((seconds / 3600)) hours"
minutes="$((seconds % 3600 / 60)) minutes"
days="$((seconds / 60 / 60 / 24)) days"
hours="$((seconds / 60 / 60 % 24)) hours"
minutes="$((seconds / 60 % 60)) minutes"
case "$days" in
"0 days") unset days ;;