udf: Factor out trimming of crtime