Reproduces on master.

```
SELECT toDateTime64('2021-03-22', 3, 'Asia/Tehran')

Query id: 26f7c373-f473-4209-8976-6ada79a8627f

┌─toDateTime64('2021-03-22', 3, 'Asia/Tehran')─┐
│                      2157-04-28 06:28:16.000 │
└──────────────────────────────────────────────┘
```
{
        return makeDate(num / 10000, num / 100 % 100, num % 100);
    }
    inline ExtendedDayNum YYYYMMDDToDayNum(UInt32 num) const
    {
        return makeDayNum(num / 10000, num / 100 % 100, num % 100);
    }
    struct DateComponents
    {
        uint16_t year;
        uint8_t month;
        uint8_t day;
    };
    struct TimeComponents
    {
        uint8_t hour;
        uint8_t minute;
        uint8_t second;
    };
    struct DateTimeComponents
    {
        DateComponents date;
        TimeComponents time;
    };
    inline DateComponents toDateComponents(Time t) const
    {
        const Values & values = getValues(t);
        return { values.year, values.month, values.day_of_month };
    }
    inline DateTimeComponents toDateTimeComponents(Time t) const