improved date conversion to local values