From http://stackoverflow.com/questions/6312993/javascript-seconds-to-time-with-format-hhmmss