Helper function to parse an ISO date and time.