
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
{
        auto date_time = time_zone.fromDayNum(ExtendedDayNum(d));
        return date_time <= 0xffffffff ? UInt32(date_time) : UInt32(0xffffffff);
    }
    static inline UInt32 execute(Int32 d, const DateLUTImpl & time_zone)
    {
        if (d < 0)
            return 0;
        auto date_time = time_zone.fromDayNum(ExtendedDayNum(d));
        return date_time <= 0xffffffff ? date_time : 0xffffffff;
    }
    static inline UInt32 execute(UInt32 dt, const DateLUTImpl & )
    {
        return dt;
    }
    static inline UInt32 execute(Int64 d, const DateLUTImpl & time_zone)
    {
        if (d < 0)
            return 0;
        auto date_time = time_zone.toDate(d);
        return date_time <= 0xffffffff ? date_time : 0xffffffff;
    }
    static inline UInt32 execute(const DecimalUtils::DecimalComponents<DateTime64> & t, const DateLUTImpl & )