By default, format time values in [hh:]mm:ss. Also use printf instead of echo, which is shell-specific.