
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
{
        ColumnUInt8::MutablePtr null_map = copyNullMap(arguments[0].column);
        const auto & col_with_type_and_name =  columnGetNested(arguments[0]);
        const auto & type = static_cast<const FromDataType &>(*col_with_type_and_name.type);
        const DateLUTImpl * time_zone = nullptr;
        
        if constexpr (std::is_same_v<FromDataType, DataTypeDateTime> || std::is_same_v<FromDataType, DataTypeDateTime64>)
        {
            auto non_null_args = createBlockWithNestedColumns(arguments);
            time_zone = &extractTimeZoneFromFunctionArguments(non_null_args, 1, 0);
        }
        if (const auto col_from = checkAndGetColumn<ColVecType>(col_with_type_and_name.column.get()))
        {
            auto col_to = ColumnString::create();
            const typename ColVecType::Container & vec_from = col_from->getData();
            ColumnString::Chars & data_to = col_to->getChars();
            ColumnString::Offsets & offsets_to = col_to->getOffsets();
            size_t size = vec_from.size();
            if constexpr (std::is_same_v<FromDataType, DataTypeDate>)
                data_to.resize(size * (strlen("YYYY-MM-DD") + 1));
            else if constexpr (std::is_same_v<FromDataType, DataTypeDate32>)