
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
static IFunction::Monotonicity get(const IDataType & type, const Field & left, const Field & right)
    {
        auto which = WhichDataType(type);
        if (which.isDateOrDate32() || which.isDateTime() || which.isDateTime64() || which.isInt8() || which.isInt16() || which.isUInt8() || which.isUInt16())
            return { .is_monotonic = true, .is_always_monotonic = true };
        else if (
            (which.isUInt() && ((left.isNull() || left.get<UInt64>() < 0xFFFF) && (right.isNull() || right.get<UInt64>() >= 0xFFFF)))
            || (which.isInt() && ((left.isNull() || left.get<Int64>() < 0xFFFF) && (right.isNull() || right.get<Int64>() >= 0xFFFF)))
            || (which.isFloat() && ((left.isNull() || left.get<Float64>() < 0xFFFF) && (right.isNull() || right.get<Float64>() >= 0xFFFF)))
            || !type.isValueRepresentedByNumber())
            return {};
        else
            return { .is_monotonic = true, .is_always_monotonic = true };
    }
};
struct ToDateTimeMonotonicity
{
    static bool has() { return true; }