fix small bug in custom datetime type