Add format time method,