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 lut[toFirstDayNumOfISOYearIndex(t)].date;
    }
    
    
    template <typename DateOrTime>
    inline unsigned toISOWeek(DateOrTime v) const
    {
        return 1 + (toFirstDayNumOfWeek(v) - toFirstDayNumOfISOYear(v)) / 7;
    }
    /*
      The bits in week_mode has the following meaning:
       WeekModeFlag::MONDAY_FIRST (0)  If not set Sunday is first day of week
                      If set Monday is first day of week
       WeekModeFlag::YEAR (1) If not set Week is in range 0-53
        Week 0 is returned for the the last week of the previous year (for
        a date at start of january) In this case one can get 53 for the
        first week of next year.  This flag ensures that the week is
        relevant for the given year. Note that this flag is only
        relevant if WeekModeFlag::JANUARY is not set.
                  If set Week is in range 1-53.
        In this case one may get week 53 for a date in January (when
        the week is that last week of previous year) and week 1 for a
        date in December.
      WeekModeFlag::FIRST_WEEKDAY (2) If not set Weeks are numbered according
                        to ISO 8601:1988
                  If set The week that contains the first
                        'first-day-of-week' is week 1.