Fixed date/time insert code bug