factor out date_time normalization