
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
{
        if (checkAndGetDataType<DataTypeString>(from_type.get()))
        {
            return &ConvertImplGenericFromString<ColumnString>::execute;
        }
        return createWrapper<ToDataType>(from_type, to_type, requested_result_is_nullable);
    }
    WrapperType createUInt8ToBoolWrapper(const DataTypePtr from_type, const DataTypePtr to_type) const
    {
        return [from_type, to_type] (ColumnsWithTypeAndName & arguments, const DataTypePtr &, const ColumnNullable *, size_t ) -> ColumnPtr
        {
            
            
            
            auto res_column = to_type->createColumn();
            const auto & data_from = checkAndGetColumn<ColumnUInt8>(arguments[0].column.get())->getData();
            auto & data_to = assert_cast<ColumnUInt8 *>(res_column.get())->getData();
            data_to.resize(data_from.size());
            for (size_t i = 0; i != data_from.size(); ++i)
                data_to[i] = static_cast<bool>(data_from[i]);
            return res_column;
        };
    }
    static WrapperType createStringWrapper(const DataTypePtr & from_type)
    {
        FunctionPtr function = FunctionToString::create();
        return createFunctionAdaptor(function, from_type);
    }
    WrapperType createFixedStringWrapper(const DataTypePtr & from_type, const size_t N) const