
select toDateTime64(-86400 ,9,'UTC') ==  1969-12-31 00:00:00.000000000

select toDateTime64(-86400.00 ,9,'UTC') ==  1970-01-01 00:00:00.000000000 


However, I expect both outputs to be same. 

Version affected : 22.8
{
        return (from < DATE_LUT_MAX_EXTEND_DAY_NUM)
            ? from
            : std::min<Int32>(Int32(time_zone.toDayNum(from)), Int32(DATE_LUT_MAX_EXTEND_DAY_NUM));
    }
};
template <typename FromType, typename ToType>
struct ToDate32Transform32Or64Signed
{
    static constexpr auto name = "toDate32";
    static inline NO_SANITIZE_UNDEFINED ToType execute(const FromType & from, const DateLUTImpl & time_zone)
    {
        static const Int32 daynum_min_offset = -static_cast<Int32>(DateLUT::instance().getDayNumOffsetEpoch());
        if (from < daynum_min_offset)
            return daynum_min_offset;
        return (from < DATE_LUT_MAX_EXTEND_DAY_NUM)
            ? static_cast<ToType>(from)
            : time_zone.toDayNum(std::min<Int64>(Int64(from), Int64(0xFFFFFFFF)));
    }
};
template <typename FromType, typename ToType>
struct ToDate32Transform8Or16Signed
{
    static constexpr auto name = "toDate32";
    static inline NO_SANITIZE_UNDEFINED ToType execute(const FromType & from, const DateLUTImpl &)