fixed the date time conversion