Repaired formatTime