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 │
└──────────────────────────────────────────────┘
```
#pragma once
#include "DayNum.h"
#include "defines.h"
#include "types.h"
#include <ctime>
#include <cassert>
#include <string>
#include <type_traits>
#define DATE_LUT_MIN_YEAR 1925 /// 1925 since wast majority of timezones changed to 15-minute aligned offsets somewhere in 1924 or earlier.
#define DATE_LUT_MAX_YEAR 2283 /// Last supported year (complete)
#define DATE_LUT_YEARS (1 + DATE_LUT_MAX_YEAR - DATE_LUT_MIN_YEAR) /// Number of years in lookup table
#define DATE_LUT_SIZE 0x20000
#define DATE_LUT_MAX (0xFFFFFFFFU - 86400)
#define DATE_LUT_MAX_DAY_NUM 0xFFFF
#define DATE_LUT_MAX_EXTEND_DAY_NUM (DATE_LUT_SIZE - 16436)
#define DATE_LUT_ADD ((1970 - DATE_LUT_MIN_YEAR) * 366 * 86400)
#if defined(__PPC__)
#if !defined(__clang__)
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#endif
enum class WeekModeFlag : UInt8