convert seconds to days bash function code example Example: bash convert seconds to date date -u -d @$i +%H:%M:%S