`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).
extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH;
    extern const int ILLEGAL_TYPE_OF_ARGUMENT;
    extern const int NOT_IMPLEMENTED;
    extern const int ILLEGAL_COLUMN;
    extern const int BAD_ARGUMENTS;
}
namespace
{
template <typename DataType> struct ActionValueTypeMap {};
template <> struct ActionValueTypeMap<DataTypeInt8>       { using ActionValueType = UInt32; };
template <> struct ActionValueTypeMap<DataTypeUInt8>      { using ActionValueType = UInt32; };
template <> struct ActionValueTypeMap<DataTypeInt16>      { using ActionValueType = UInt32; };
template <> struct ActionValueTypeMap<DataTypeUInt16>     { using ActionValueType = UInt32; };
template <> struct ActionValueTypeMap<DataTypeInt32>      { using ActionValueType = UInt32; };
template <> struct ActionValueTypeMap<DataTypeUInt32>     { using ActionValueType = UInt32; };
template <> struct ActionValueTypeMap<DataTypeInt64>      { using ActionValueType = UInt32; };
template <> struct ActionValueTypeMap<DataTypeUInt64>     { using ActionValueType = UInt32; };
template <> struct ActionValueTypeMap<DataTypeDate>       { using ActionValueType = UInt16; };
template <> struct ActionValueTypeMap<DataTypeDateTime>   { using ActionValueType = UInt32; };
template <> struct ActionValueTypeMap<DataTypeDateTime64> { using ActionValueType = Int64; };
/** formatDateTime(time, 'pattern')
  * Performs formatting of time, according to provided pattern.
  *
  * This function is optimized with an assumption, that the resulting strings are fixed width.
  * (This assumption is fulfilled for currently supported formatting options).
  *
  * It is implemented in two steps.
  * At first step, it creates a pattern of zeros, literal characters, whitespaces, etc.
  *  and quickly fills resulting character array (string column) with this pattern.
  * At second step, it walks across the resulting character array and modifies/replaces specific characters,