Fix the date/timestamp conversion