Changed formatWhen to return hh:mm:ss.