
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 createMapToObjectWrapper(*from_map, to_type->hasNullableSubcolumns());
        }
        else if (checkAndGetDataType<DataTypeString>(from_type.get()))
        {
            return [] (ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, const ColumnNullable * nullable_source, size_t input_rows_count)
            {
                auto res = ConvertImplGenericFromString<ColumnString>::execute(arguments, result_type, nullable_source, input_rows_count);
                auto & res_object = assert_cast<ColumnObject &>(res->assumeMutableRef());
                res_object.finalize();
                return res;
            };
        }
        else if (checkAndGetDataType<DataTypeObject>(from_type.get()))
        {
            return [is_nullable = to_type->hasNullableSubcolumns()] (ColumnsWithTypeAndName & arguments, const DataTypePtr & , const ColumnNullable * , size_t) -> ColumnPtr
            {
                auto & column_object = assert_cast<const ColumnObject &>(*arguments.front().column);
                auto res = ColumnObject::create(is_nullable);
                for (size_t i = 0; i < column_object.size(); i++)
                    res->insert(column_object[i]);
                res->finalize();
                return res;
            };
        }
        throw Exception(ErrorCodes::TYPE_MISMATCH,
            "Cast to Object can be performed only from flatten named Tuple, Map or String. Got: {}", from_type->getName());
    }
    template <typename FieldType>
    WrapperType createEnumWrapper(const DataTypePtr & from_type, const DataTypeEnum<FieldType> * to_type) const