Use the format time method in Utilities.