Fix formatting of time function