Put the time format function into a separate file.