fix some date conversion