`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).
#include <Core/Types.h>
#include <Core/DecimalFunctions.h>
#include <Core/UUID.h>
#include <Common/Exception.h>
#include <Common/StringUtils/StringUtils.h>
#include <Common/Arena.h>
#include <Common/UInt128.h>
#include <Common/intExp.h>
#include <Formats/FormatSettings.h>
#include <IO/CompressionMethod.h>
#include <IO/ReadBuffer.h>
#include <IO/ReadBufferFromMemory.h>
#include <IO/BufferWithOwnMemory.h>
#include <IO/VarInt.h>
#include <DataTypes/DataTypeDateTime.h>
#include <double-conversion/double-conversion.h>
#define DEFAULT_MAX_STRING_SIZE (1ULL << 30)
namespace DB
{
namespace ErrorCodes
{
    extern const int CANNOT_PARSE_DATE;
    extern const int CANNOT_PARSE_DATETIME;
    extern const int CANNOT_PARSE_UUID;
    extern const int CANNOT_READ_ARRAY_FROM_TEXT;
    extern const int CANNOT_PARSE_NUMBER;
    extern const int ILLEGAL_TYPE_OF_ARGUMENT;
    extern const int INCORRECT_DATA;
}
inline char parseEscapeSequence(char c)