Remove while loops from time-format