`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).
else if (std::is_same_v<DataType, DataTypeDateTime64> || std::is_same_v<DataType, DataTypeDateTime>)
            time_zone_tmp = &extractTimeZoneFromFunctionArguments(arguments, 2, 0);
        else
            time_zone_tmp = &DateLUT::instance();
        const DateLUTImpl & time_zone = *time_zone_tmp;
        const auto & vec = times->getData();
        UInt32 scale [[maybe_unused]] = 0;
        if constexpr (std::is_same_v<DataType, DataTypeDateTime64>)
        {
            scale = vec.getScale();
        }
        auto col_res = ColumnString::create();
        auto & dst_data = col_res->getChars();
        auto & dst_offsets = col_res->getOffsets();
        dst_data.resize(vec.size() * (result_size + 1));
        dst_offsets.resize(vec.size());
        
        {
            UInt8 * begin = dst_data.data();
            UInt8 * end = begin + dst_data.size();
            UInt8 * pos = begin;
            if (pos < end)
            {
                memcpy(pos, pattern_to_fill.data(), result_size + 1);   
                pos += result_size + 1;
            }
            
            while (pos < end)
            {
                size_t bytes_to_copy = std::min(pos - begin, end - pos);