`formatDateTime(..., '%C')` returns wrong value when date is outwith normal range
```
SELECT formatDateTime(toDateTime64('1935-12-12 12:12:12', 0, 'Europe/Moscow'), '%C')

┌─formatDateTime(toDateTime64('1935-12-12 12:12:12', 0, 'Europe/Moscow'), '%C')─┐
│ 20                                                                            │
└───────────────────────────────────────────────────────────────────────────────┘


SELECT formatDateTime(toDateTime64('1969-12-12 12:12:12', 0, 'Europe/Moscow'), '%C')

┌─formatDateTime(toDateTime64('1969-12-12 12:12:12', 0, 'Europe/Moscow'), '%C')─┐
│ 21                                                                            │
└───────────────────────────────────────────────────────────────────────────────┘

SELECT formatDateTime(toDateTime64('2200-12-12 12:12:12', 0, 'Europe/Moscow'), '%C')

┌─formatDateTime(toDateTime64('2200-12-12 12:12:12', 0, 'Europe/Moscow'), '%C')─┐
│ 20                                                                            │
└───────────────────────────────────────────────────────────────────────────────┘


```

ClickHouse version 21.5.1.6463 (official build).
{
        ColumnPtr res;
        if constexpr (support_integer)
        {
            if (arguments.size() == 1)
            {
                if (!castType(arguments[0].type.get(), [&](const auto & type)
                    {
                        using FromDataType = std::decay_t<decltype(type)>;
                        res = ConvertImpl<FromDataType, DataTypeDateTime, Name>::execute(arguments, result_type, input_rows_count);
                        return true;
                    }))
                {
                    throw Exception(
                        "Illegal column " + arguments[0].column->getName() + " of function " + getName()
                            + ", must be Integer or DateTime when arguments size is 1.",
                        ErrorCodes::ILLEGAL_COLUMN);
                }
            }
            else
            {
                if (!castType(arguments[0].type.get(), [&](const auto & type)
                    {
                        using FromDataType = std::decay_t<decltype(type)>;
                        if (!(res = executeType<FromDataType>(arguments, result_type)))
                            throw Exception(