Fix date string to date object conversion.