__init__.py 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558
  1. '''
  2. datetime.tzinfo timezone definitions generated from the
  3. Olson timezone database:
  4. ftp://elsie.nci.nih.gov/pub/tz*.tar.gz
  5. See the datetime section of the Python Library Reference for information
  6. on how to use these modules.
  7. '''
  8. import sys
  9. import datetime
  10. import os.path
  11. from pytz.exceptions import AmbiguousTimeError
  12. from pytz.exceptions import InvalidTimeError
  13. from pytz.exceptions import NonExistentTimeError
  14. from pytz.exceptions import UnknownTimeZoneError
  15. from pytz.lazy import LazyDict, LazyList, LazySet # noqa
  16. from pytz.tzinfo import unpickler, BaseTzInfo
  17. from pytz.tzfile import build_tzinfo
  18. # The IANA (nee Olson) database is updated several times a year.
  19. OLSON_VERSION = '2021a'
  20. VERSION = '2021.1' # pip compatible version number.
  21. __version__ = VERSION
  22. OLSEN_VERSION = OLSON_VERSION # Old releases had this misspelling
  23. __all__ = [
  24. 'timezone', 'utc', 'country_timezones', 'country_names',
  25. 'AmbiguousTimeError', 'InvalidTimeError',
  26. 'NonExistentTimeError', 'UnknownTimeZoneError',
  27. 'all_timezones', 'all_timezones_set',
  28. 'common_timezones', 'common_timezones_set',
  29. 'BaseTzInfo', 'FixedOffset',
  30. ]
  31. if sys.version_info[0] > 2: # Python 3.x
  32. # Python 3.x doesn't have unicode(), making writing code
  33. # for Python 2.3 and Python 3.x a pain.
  34. unicode = str
  35. def ascii(s):
  36. r"""
  37. >>> ascii('Hello')
  38. 'Hello'
  39. >>> ascii('\N{TRADE MARK SIGN}') #doctest: +IGNORE_EXCEPTION_DETAIL
  40. Traceback (most recent call last):
  41. ...
  42. UnicodeEncodeError: ...
  43. """
  44. if type(s) == bytes:
  45. s = s.decode('ASCII')
  46. else:
  47. s.encode('ASCII') # Raise an exception if not ASCII
  48. return s # But the string - not a byte string.
  49. else: # Python 2.x
  50. def ascii(s):
  51. r"""
  52. >>> ascii('Hello')
  53. 'Hello'
  54. >>> ascii(u'Hello')
  55. 'Hello'
  56. >>> ascii(u'\N{TRADE MARK SIGN}') #doctest: +IGNORE_EXCEPTION_DETAIL
  57. Traceback (most recent call last):
  58. ...
  59. UnicodeEncodeError: ...
  60. """
  61. return s.encode('ASCII')
  62. def open_resource(name):
  63. """Open a resource from the zoneinfo subdir for reading.
  64. Uses the pkg_resources module if available and no standard file
  65. found at the calculated location.
  66. It is possible to specify different location for zoneinfo
  67. subdir by using the PYTZ_TZDATADIR environment variable.
  68. """
  69. name_parts = name.lstrip('/').split('/')
  70. for part in name_parts:
  71. if part == os.path.pardir or os.path.sep in part:
  72. raise ValueError('Bad path segment: %r' % part)
  73. zoneinfo_dir = os.environ.get('PYTZ_TZDATADIR', None)
  74. if zoneinfo_dir is not None:
  75. filename = os.path.join(zoneinfo_dir, *name_parts)
  76. else:
  77. filename = os.path.join(os.path.dirname(__file__),
  78. 'zoneinfo', *name_parts)
  79. if not os.path.exists(filename):
  80. # http://bugs.launchpad.net/bugs/383171 - we avoid using this
  81. # unless absolutely necessary to help when a broken version of
  82. # pkg_resources is installed.
  83. try:
  84. from pkg_resources import resource_stream
  85. except ImportError:
  86. resource_stream = None
  87. if resource_stream is not None:
  88. return resource_stream(__name__, 'zoneinfo/' + name)
  89. return open(filename, 'rb')
  90. def resource_exists(name):
  91. """Return true if the given resource exists"""
  92. try:
  93. if os.environ.get('PYTZ_SKIPEXISTSCHECK', ''):
  94. # In "standard" distributions, we can assume that
  95. # all the listed timezones are present. As an
  96. # import-speed optimization, you can set the
  97. # PYTZ_SKIPEXISTSCHECK flag to skip checking
  98. # for the presence of the resource file on disk.
  99. return True
  100. open_resource(name).close()
  101. return True
  102. except IOError:
  103. return False
  104. _tzinfo_cache = {}
  105. def timezone(zone):
  106. r''' Return a datetime.tzinfo implementation for the given timezone
  107. >>> from datetime import datetime, timedelta
  108. >>> utc = timezone('UTC')
  109. >>> eastern = timezone('US/Eastern')
  110. >>> eastern.zone
  111. 'US/Eastern'
  112. >>> timezone(unicode('US/Eastern')) is eastern
  113. True
  114. >>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)
  115. >>> loc_dt = utc_dt.astimezone(eastern)
  116. >>> fmt = '%Y-%m-%d %H:%M:%S %Z (%z)'
  117. >>> loc_dt.strftime(fmt)
  118. '2002-10-27 01:00:00 EST (-0500)'
  119. >>> (loc_dt - timedelta(minutes=10)).strftime(fmt)
  120. '2002-10-27 00:50:00 EST (-0500)'
  121. >>> eastern.normalize(loc_dt - timedelta(minutes=10)).strftime(fmt)
  122. '2002-10-27 01:50:00 EDT (-0400)'
  123. >>> (loc_dt + timedelta(minutes=10)).strftime(fmt)
  124. '2002-10-27 01:10:00 EST (-0500)'
  125. Raises UnknownTimeZoneError if passed an unknown zone.
  126. >>> try:
  127. ... timezone('Asia/Shangri-La')
  128. ... except UnknownTimeZoneError:
  129. ... print('Unknown')
  130. Unknown
  131. >>> try:
  132. ... timezone(unicode('\N{TRADE MARK SIGN}'))
  133. ... except UnknownTimeZoneError:
  134. ... print('Unknown')
  135. Unknown
  136. '''
  137. if zone is None:
  138. raise UnknownTimeZoneError(None)
  139. if zone.upper() == 'UTC':
  140. return utc
  141. try:
  142. zone = ascii(zone)
  143. except UnicodeEncodeError:
  144. # All valid timezones are ASCII
  145. raise UnknownTimeZoneError(zone)
  146. zone = _case_insensitive_zone_lookup(_unmunge_zone(zone))
  147. if zone not in _tzinfo_cache:
  148. if zone in all_timezones_set: # noqa
  149. fp = open_resource(zone)
  150. try:
  151. _tzinfo_cache[zone] = build_tzinfo(zone, fp)
  152. finally:
  153. fp.close()
  154. else:
  155. raise UnknownTimeZoneError(zone)
  156. return _tzinfo_cache[zone]
  157. def _unmunge_zone(zone):
  158. """Undo the time zone name munging done by older versions of pytz."""
  159. return zone.replace('_plus_', '+').replace('_minus_', '-')
  160. _all_timezones_lower_to_standard = None
  161. def _case_insensitive_zone_lookup(zone):
  162. """case-insensitively matching timezone, else return zone unchanged"""
  163. global _all_timezones_lower_to_standard
  164. if _all_timezones_lower_to_standard is None:
  165. _all_timezones_lower_to_standard = dict((tz.lower(), tz) for tz in all_timezones) # noqa
  166. return _all_timezones_lower_to_standard.get(zone.lower()) or zone # noqa
  167. ZERO = datetime.timedelta(0)
  168. HOUR = datetime.timedelta(hours=1)
  169. class UTC(BaseTzInfo):
  170. """UTC
  171. Optimized UTC implementation. It unpickles using the single module global
  172. instance defined beneath this class declaration.
  173. """
  174. zone = "UTC"
  175. _utcoffset = ZERO
  176. _dst = ZERO
  177. _tzname = zone
  178. def fromutc(self, dt):
  179. if dt.tzinfo is None:
  180. return self.localize(dt)
  181. return super(utc.__class__, self).fromutc(dt)
  182. def utcoffset(self, dt):
  183. return ZERO
  184. def tzname(self, dt):
  185. return "UTC"
  186. def dst(self, dt):
  187. return ZERO
  188. def __reduce__(self):
  189. return _UTC, ()
  190. def localize(self, dt, is_dst=False):
  191. '''Convert naive time to local time'''
  192. if dt.tzinfo is not None:
  193. raise ValueError('Not naive datetime (tzinfo is already set)')
  194. return dt.replace(tzinfo=self)
  195. def normalize(self, dt, is_dst=False):
  196. '''Correct the timezone information on the given datetime'''
  197. if dt.tzinfo is self:
  198. return dt
  199. if dt.tzinfo is None:
  200. raise ValueError('Naive time - no tzinfo set')
  201. return dt.astimezone(self)
  202. def __repr__(self):
  203. return "<UTC>"
  204. def __str__(self):
  205. return "UTC"
  206. UTC = utc = UTC() # UTC is a singleton
  207. def _UTC():
  208. """Factory function for utc unpickling.
  209. Makes sure that unpickling a utc instance always returns the same
  210. module global.
  211. These examples belong in the UTC class above, but it is obscured; or in
  212. the README.rst, but we are not depending on Python 2.4 so integrating
  213. the README.rst examples with the unit tests is not trivial.
  214. >>> import datetime, pickle
  215. >>> dt = datetime.datetime(2005, 3, 1, 14, 13, 21, tzinfo=utc)
  216. >>> naive = dt.replace(tzinfo=None)
  217. >>> p = pickle.dumps(dt, 1)
  218. >>> naive_p = pickle.dumps(naive, 1)
  219. >>> len(p) - len(naive_p)
  220. 17
  221. >>> new = pickle.loads(p)
  222. >>> new == dt
  223. True
  224. >>> new is dt
  225. False
  226. >>> new.tzinfo is dt.tzinfo
  227. True
  228. >>> utc is UTC is timezone('UTC')
  229. True
  230. >>> utc is timezone('GMT')
  231. False
  232. """
  233. return utc
  234. _UTC.__safe_for_unpickling__ = True
  235. def _p(*args):
  236. """Factory function for unpickling pytz tzinfo instances.
  237. Just a wrapper around tzinfo.unpickler to save a few bytes in each pickle
  238. by shortening the path.
  239. """
  240. return unpickler(*args)
  241. _p.__safe_for_unpickling__ = True
  242. class _CountryTimezoneDict(LazyDict):
  243. """Map ISO 3166 country code to a list of timezone names commonly used
  244. in that country.
  245. iso3166_code is the two letter code used to identify the country.
  246. >>> def print_list(list_of_strings):
  247. ... 'We use a helper so doctests work under Python 2.3 -> 3.x'
  248. ... for s in list_of_strings:
  249. ... print(s)
  250. >>> print_list(country_timezones['nz'])
  251. Pacific/Auckland
  252. Pacific/Chatham
  253. >>> print_list(country_timezones['ch'])
  254. Europe/Zurich
  255. >>> print_list(country_timezones['CH'])
  256. Europe/Zurich
  257. >>> print_list(country_timezones[unicode('ch')])
  258. Europe/Zurich
  259. >>> print_list(country_timezones['XXX'])
  260. Traceback (most recent call last):
  261. ...
  262. KeyError: 'XXX'
  263. Previously, this information was exposed as a function rather than a
  264. dictionary. This is still supported::
  265. >>> print_list(country_timezones('nz'))
  266. Pacific/Auckland
  267. Pacific/Chatham
  268. """
  269. def __call__(self, iso3166_code):
  270. """Backwards compatibility."""
  271. return self[iso3166_code]
  272. def _fill(self):
  273. data = {}
  274. zone_tab = open_resource('zone.tab')
  275. try:
  276. for line in zone_tab:
  277. line = line.decode('UTF-8')
  278. if line.startswith('#'):
  279. continue
  280. code, coordinates, zone = line.split(None, 4)[:3]
  281. if zone not in all_timezones_set: # noqa
  282. continue
  283. try:
  284. data[code].append(zone)
  285. except KeyError:
  286. data[code] = [zone]
  287. self.data = data
  288. finally:
  289. zone_tab.close()
  290. country_timezones = _CountryTimezoneDict()
  291. class _CountryNameDict(LazyDict):
  292. '''Dictionary proving ISO3166 code -> English name.
  293. >>> print(country_names['au'])
  294. Australia
  295. '''
  296. def _fill(self):
  297. data = {}
  298. zone_tab = open_resource('iso3166.tab')
  299. try:
  300. for line in zone_tab.readlines():
  301. line = line.decode('UTF-8')
  302. if line.startswith('#'):
  303. continue
  304. code, name = line.split(None, 1)
  305. data[code] = name.strip()
  306. self.data = data
  307. finally:
  308. zone_tab.close()
  309. country_names = _CountryNameDict()
  310. # Time-zone info based solely on fixed offsets
  311. class _FixedOffset(datetime.tzinfo):
  312. zone = None # to match the standard pytz API
  313. def __init__(self, minutes):
  314. if abs(minutes) >= 1440:
  315. raise ValueError("absolute offset is too large", minutes)
  316. self._minutes = minutes
  317. self._offset = datetime.timedelta(minutes=minutes)
  318. def utcoffset(self, dt):
  319. return self._offset
  320. def __reduce__(self):
  321. return FixedOffset, (self._minutes, )
  322. def dst(self, dt):
  323. return ZERO
  324. def tzname(self, dt):
  325. return None
  326. def __repr__(self):
  327. return 'pytz.FixedOffset(%d)' % self._minutes
  328. def localize(self, dt, is_dst=False):
  329. '''Convert naive time to local time'''
  330. if dt.tzinfo is not None:
  331. raise ValueError('Not naive datetime (tzinfo is already set)')
  332. return dt.replace(tzinfo=self)
  333. def normalize(self, dt, is_dst=False):
  334. '''Correct the timezone information on the given datetime'''
  335. if dt.tzinfo is self:
  336. return dt
  337. if dt.tzinfo is None:
  338. raise ValueError('Naive time - no tzinfo set')
  339. return dt.astimezone(self)
  340. def FixedOffset(offset, _tzinfos={}):
  341. """return a fixed-offset timezone based off a number of minutes.
  342. >>> one = FixedOffset(-330)
  343. >>> one
  344. pytz.FixedOffset(-330)
  345. >>> str(one.utcoffset(datetime.datetime.now()))
  346. '-1 day, 18:30:00'
  347. >>> str(one.dst(datetime.datetime.now()))
  348. '0:00:00'
  349. >>> two = FixedOffset(1380)
  350. >>> two
  351. pytz.FixedOffset(1380)
  352. >>> str(two.utcoffset(datetime.datetime.now()))
  353. '23:00:00'
  354. >>> str(two.dst(datetime.datetime.now()))
  355. '0:00:00'
  356. The datetime.timedelta must be between the range of -1 and 1 day,
  357. non-inclusive.
  358. >>> FixedOffset(1440)
  359. Traceback (most recent call last):
  360. ...
  361. ValueError: ('absolute offset is too large', 1440)
  362. >>> FixedOffset(-1440)
  363. Traceback (most recent call last):
  364. ...
  365. ValueError: ('absolute offset is too large', -1440)
  366. An offset of 0 is special-cased to return UTC.
  367. >>> FixedOffset(0) is UTC
  368. True
  369. There should always be only one instance of a FixedOffset per timedelta.
  370. This should be true for multiple creation calls.
  371. >>> FixedOffset(-330) is one
  372. True
  373. >>> FixedOffset(1380) is two
  374. True
  375. It should also be true for pickling.
  376. >>> import pickle
  377. >>> pickle.loads(pickle.dumps(one)) is one
  378. True
  379. >>> pickle.loads(pickle.dumps(two)) is two
  380. True
  381. """
  382. if offset == 0:
  383. return UTC
  384. info = _tzinfos.get(offset)
  385. if info is None:
  386. # We haven't seen this one before. we need to save it.
  387. # Use setdefault to avoid a race condition and make sure we have
  388. # only one
  389. info = _tzinfos.setdefault(offset, _FixedOffset(offset))
  390. return info
  391. FixedOffset.__safe_for_unpickling__ = True
  392. def _test():
  393. import doctest
  394. sys.path.insert(0, os.pardir)
  395. import pytz
  396. return doctest.testmod(pytz)
  397. if __name__ == '__main__':
  398. _test()
  399. all_timezones = \
  400. ['Africa/Abidjan',
  401. 'Africa/Accra',
  402. 'Africa/Addis_Ababa',
  403. 'Africa/Algiers',
  404. 'Africa/Asmara',
  405. 'Africa/Asmera',
  406. 'Africa/Bamako',
  407. 'Africa/Bangui',
  408. 'Africa/Banjul',
  409. 'Africa/Bissau',
  410. 'Africa/Blantyre',
  411. 'Africa/Brazzaville',
  412. 'Africa/Bujumbura',
  413. 'Africa/Cairo',
  414. 'Africa/Casablanca',
  415. 'Africa/Ceuta',
  416. 'Africa/Conakry',
  417. 'Africa/Dakar',
  418. 'Africa/Dar_es_Salaam',
  419. 'Africa/Djibouti',
  420. 'Africa/Douala',
  421. 'Africa/El_Aaiun',
  422. 'Africa/Freetown',
  423. 'Africa/Gaborone',
  424. 'Africa/Harare',
  425. 'Africa/Johannesburg',
  426. 'Africa/Juba',
  427. 'Africa/Kampala',
  428. 'Africa/Khartoum',
  429. 'Africa/Kigali',
  430. 'Africa/Kinshasa',
  431. 'Africa/Lagos',
  432. 'Africa/Libreville',
  433. 'Africa/Lome',
  434. 'Africa/Luanda',
  435. 'Africa/Lubumbashi',
  436. 'Africa/Lusaka',
  437. 'Africa/Malabo',
  438. 'Africa/Maputo',
  439. 'Africa/Maseru',
  440. 'Africa/Mbabane',
  441. 'Africa/Mogadishu',
  442. 'Africa/Monrovia',
  443. 'Africa/Nairobi',
  444. 'Africa/Ndjamena',
  445. 'Africa/Niamey',
  446. 'Africa/Nouakchott',
  447. 'Africa/Ouagadougou',
  448. 'Africa/Porto-Novo',
  449. 'Africa/Sao_Tome',
  450. 'Africa/Timbuktu',
  451. 'Africa/Tripoli',
  452. 'Africa/Tunis',
  453. 'Africa/Windhoek',
  454. 'America/Adak',
  455. 'America/Anchorage',
  456. 'America/Anguilla',
  457. 'America/Antigua',
  458. 'America/Araguaina',
  459. 'America/Argentina/Buenos_Aires',
  460. 'America/Argentina/Catamarca',
  461. 'America/Argentina/ComodRivadavia',
  462. 'America/Argentina/Cordoba',
  463. 'America/Argentina/Jujuy',
  464. 'America/Argentina/La_Rioja',
  465. 'America/Argentina/Mendoza',
  466. 'America/Argentina/Rio_Gallegos',
  467. 'America/Argentina/Salta',
  468. 'America/Argentina/San_Juan',
  469. 'America/Argentina/San_Luis',
  470. 'America/Argentina/Tucuman',
  471. 'America/Argentina/Ushuaia',
  472. 'America/Aruba',
  473. 'America/Asuncion',
  474. 'America/Atikokan',
  475. 'America/Atka',
  476. 'America/Bahia',
  477. 'America/Bahia_Banderas',
  478. 'America/Barbados',
  479. 'America/Belem',
  480. 'America/Belize',
  481. 'America/Blanc-Sablon',
  482. 'America/Boa_Vista',
  483. 'America/Bogota',
  484. 'America/Boise',
  485. 'America/Buenos_Aires',
  486. 'America/Cambridge_Bay',
  487. 'America/Campo_Grande',
  488. 'America/Cancun',
  489. 'America/Caracas',
  490. 'America/Catamarca',
  491. 'America/Cayenne',
  492. 'America/Cayman',
  493. 'America/Chicago',
  494. 'America/Chihuahua',
  495. 'America/Coral_Harbour',
  496. 'America/Cordoba',
  497. 'America/Costa_Rica',
  498. 'America/Creston',
  499. 'America/Cuiaba',
  500. 'America/Curacao',
  501. 'America/Danmarkshavn',
  502. 'America/Dawson',
  503. 'America/Dawson_Creek',
  504. 'America/Denver',
  505. 'America/Detroit',
  506. 'America/Dominica',
  507. 'America/Edmonton',
  508. 'America/Eirunepe',
  509. 'America/El_Salvador',
  510. 'America/Ensenada',
  511. 'America/Fort_Nelson',
  512. 'America/Fort_Wayne',
  513. 'America/Fortaleza',
  514. 'America/Glace_Bay',
  515. 'America/Godthab',
  516. 'America/Goose_Bay',
  517. 'America/Grand_Turk',
  518. 'America/Grenada',
  519. 'America/Guadeloupe',
  520. 'America/Guatemala',
  521. 'America/Guayaquil',
  522. 'America/Guyana',
  523. 'America/Halifax',
  524. 'America/Havana',
  525. 'America/Hermosillo',
  526. 'America/Indiana/Indianapolis',
  527. 'America/Indiana/Knox',
  528. 'America/Indiana/Marengo',
  529. 'America/Indiana/Petersburg',
  530. 'America/Indiana/Tell_City',
  531. 'America/Indiana/Vevay',
  532. 'America/Indiana/Vincennes',
  533. 'America/Indiana/Winamac',
  534. 'America/Indianapolis',
  535. 'America/Inuvik',
  536. 'America/Iqaluit',
  537. 'America/Jamaica',
  538. 'America/Jujuy',
  539. 'America/Juneau',
  540. 'America/Kentucky/Louisville',
  541. 'America/Kentucky/Monticello',
  542. 'America/Knox_IN',
  543. 'America/Kralendijk',
  544. 'America/La_Paz',
  545. 'America/Lima',
  546. 'America/Los_Angeles',
  547. 'America/Louisville',
  548. 'America/Lower_Princes',
  549. 'America/Maceio',
  550. 'America/Managua',
  551. 'America/Manaus',
  552. 'America/Marigot',
  553. 'America/Martinique',
  554. 'America/Matamoros',
  555. 'America/Mazatlan',
  556. 'America/Mendoza',
  557. 'America/Menominee',
  558. 'America/Merida',
  559. 'America/Metlakatla',
  560. 'America/Mexico_City',
  561. 'America/Miquelon',
  562. 'America/Moncton',
  563. 'America/Monterrey',
  564. 'America/Montevideo',
  565. 'America/Montreal',
  566. 'America/Montserrat',
  567. 'America/Nassau',
  568. 'America/New_York',
  569. 'America/Nipigon',
  570. 'America/Nome',
  571. 'America/Noronha',
  572. 'America/North_Dakota/Beulah',
  573. 'America/North_Dakota/Center',
  574. 'America/North_Dakota/New_Salem',
  575. 'America/Nuuk',
  576. 'America/Ojinaga',
  577. 'America/Panama',
  578. 'America/Pangnirtung',
  579. 'America/Paramaribo',
  580. 'America/Phoenix',
  581. 'America/Port-au-Prince',
  582. 'America/Port_of_Spain',
  583. 'America/Porto_Acre',
  584. 'America/Porto_Velho',
  585. 'America/Puerto_Rico',
  586. 'America/Punta_Arenas',
  587. 'America/Rainy_River',
  588. 'America/Rankin_Inlet',
  589. 'America/Recife',
  590. 'America/Regina',
  591. 'America/Resolute',
  592. 'America/Rio_Branco',
  593. 'America/Rosario',
  594. 'America/Santa_Isabel',
  595. 'America/Santarem',
  596. 'America/Santiago',
  597. 'America/Santo_Domingo',
  598. 'America/Sao_Paulo',
  599. 'America/Scoresbysund',
  600. 'America/Shiprock',
  601. 'America/Sitka',
  602. 'America/St_Barthelemy',
  603. 'America/St_Johns',
  604. 'America/St_Kitts',
  605. 'America/St_Lucia',
  606. 'America/St_Thomas',
  607. 'America/St_Vincent',
  608. 'America/Swift_Current',
  609. 'America/Tegucigalpa',
  610. 'America/Thule',
  611. 'America/Thunder_Bay',
  612. 'America/Tijuana',
  613. 'America/Toronto',
  614. 'America/Tortola',
  615. 'America/Vancouver',
  616. 'America/Virgin',
  617. 'America/Whitehorse',
  618. 'America/Winnipeg',
  619. 'America/Yakutat',
  620. 'America/Yellowknife',
  621. 'Antarctica/Casey',
  622. 'Antarctica/Davis',
  623. 'Antarctica/DumontDUrville',
  624. 'Antarctica/Macquarie',
  625. 'Antarctica/Mawson',
  626. 'Antarctica/McMurdo',
  627. 'Antarctica/Palmer',
  628. 'Antarctica/Rothera',
  629. 'Antarctica/South_Pole',
  630. 'Antarctica/Syowa',
  631. 'Antarctica/Troll',
  632. 'Antarctica/Vostok',
  633. 'Arctic/Longyearbyen',
  634. 'Asia/Aden',
  635. 'Asia/Almaty',
  636. 'Asia/Amman',
  637. 'Asia/Anadyr',
  638. 'Asia/Aqtau',
  639. 'Asia/Aqtobe',
  640. 'Asia/Ashgabat',
  641. 'Asia/Ashkhabad',
  642. 'Asia/Atyrau',
  643. 'Asia/Baghdad',
  644. 'Asia/Bahrain',
  645. 'Asia/Baku',
  646. 'Asia/Bangkok',
  647. 'Asia/Barnaul',
  648. 'Asia/Beirut',
  649. 'Asia/Bishkek',
  650. 'Asia/Brunei',
  651. 'Asia/Calcutta',
  652. 'Asia/Chita',
  653. 'Asia/Choibalsan',
  654. 'Asia/Chongqing',
  655. 'Asia/Chungking',
  656. 'Asia/Colombo',
  657. 'Asia/Dacca',
  658. 'Asia/Damascus',
  659. 'Asia/Dhaka',
  660. 'Asia/Dili',
  661. 'Asia/Dubai',
  662. 'Asia/Dushanbe',
  663. 'Asia/Famagusta',
  664. 'Asia/Gaza',
  665. 'Asia/Harbin',
  666. 'Asia/Hebron',
  667. 'Asia/Ho_Chi_Minh',
  668. 'Asia/Hong_Kong',
  669. 'Asia/Hovd',
  670. 'Asia/Irkutsk',
  671. 'Asia/Istanbul',
  672. 'Asia/Jakarta',
  673. 'Asia/Jayapura',
  674. 'Asia/Jerusalem',
  675. 'Asia/Kabul',
  676. 'Asia/Kamchatka',
  677. 'Asia/Karachi',
  678. 'Asia/Kashgar',
  679. 'Asia/Kathmandu',
  680. 'Asia/Katmandu',
  681. 'Asia/Khandyga',
  682. 'Asia/Kolkata',
  683. 'Asia/Krasnoyarsk',
  684. 'Asia/Kuala_Lumpur',
  685. 'Asia/Kuching',
  686. 'Asia/Kuwait',
  687. 'Asia/Macao',
  688. 'Asia/Macau',
  689. 'Asia/Magadan',
  690. 'Asia/Makassar',
  691. 'Asia/Manila',
  692. 'Asia/Muscat',
  693. 'Asia/Nicosia',
  694. 'Asia/Novokuznetsk',
  695. 'Asia/Novosibirsk',
  696. 'Asia/Omsk',
  697. 'Asia/Oral',
  698. 'Asia/Phnom_Penh',
  699. 'Asia/Pontianak',
  700. 'Asia/Pyongyang',
  701. 'Asia/Qatar',
  702. 'Asia/Qostanay',
  703. 'Asia/Qyzylorda',
  704. 'Asia/Rangoon',
  705. 'Asia/Riyadh',
  706. 'Asia/Saigon',
  707. 'Asia/Sakhalin',
  708. 'Asia/Samarkand',
  709. 'Asia/Seoul',
  710. 'Asia/Shanghai',
  711. 'Asia/Singapore',
  712. 'Asia/Srednekolymsk',
  713. 'Asia/Taipei',
  714. 'Asia/Tashkent',
  715. 'Asia/Tbilisi',
  716. 'Asia/Tehran',
  717. 'Asia/Tel_Aviv',
  718. 'Asia/Thimbu',
  719. 'Asia/Thimphu',
  720. 'Asia/Tokyo',
  721. 'Asia/Tomsk',
  722. 'Asia/Ujung_Pandang',
  723. 'Asia/Ulaanbaatar',
  724. 'Asia/Ulan_Bator',
  725. 'Asia/Urumqi',
  726. 'Asia/Ust-Nera',
  727. 'Asia/Vientiane',
  728. 'Asia/Vladivostok',
  729. 'Asia/Yakutsk',
  730. 'Asia/Yangon',
  731. 'Asia/Yekaterinburg',
  732. 'Asia/Yerevan',
  733. 'Atlantic/Azores',
  734. 'Atlantic/Bermuda',
  735. 'Atlantic/Canary',
  736. 'Atlantic/Cape_Verde',
  737. 'Atlantic/Faeroe',
  738. 'Atlantic/Faroe',
  739. 'Atlantic/Jan_Mayen',
  740. 'Atlantic/Madeira',
  741. 'Atlantic/Reykjavik',
  742. 'Atlantic/South_Georgia',
  743. 'Atlantic/St_Helena',
  744. 'Atlantic/Stanley',
  745. 'Australia/ACT',
  746. 'Australia/Adelaide',
  747. 'Australia/Brisbane',
  748. 'Australia/Broken_Hill',
  749. 'Australia/Canberra',
  750. 'Australia/Currie',
  751. 'Australia/Darwin',
  752. 'Australia/Eucla',
  753. 'Australia/Hobart',
  754. 'Australia/LHI',
  755. 'Australia/Lindeman',
  756. 'Australia/Lord_Howe',
  757. 'Australia/Melbourne',
  758. 'Australia/NSW',
  759. 'Australia/North',
  760. 'Australia/Perth',
  761. 'Australia/Queensland',
  762. 'Australia/South',
  763. 'Australia/Sydney',
  764. 'Australia/Tasmania',
  765. 'Australia/Victoria',
  766. 'Australia/West',
  767. 'Australia/Yancowinna',
  768. 'Brazil/Acre',
  769. 'Brazil/DeNoronha',
  770. 'Brazil/East',
  771. 'Brazil/West',
  772. 'CET',
  773. 'CST6CDT',
  774. 'Canada/Atlantic',
  775. 'Canada/Central',
  776. 'Canada/Eastern',
  777. 'Canada/Mountain',
  778. 'Canada/Newfoundland',
  779. 'Canada/Pacific',
  780. 'Canada/Saskatchewan',
  781. 'Canada/Yukon',
  782. 'Chile/Continental',
  783. 'Chile/EasterIsland',
  784. 'Cuba',
  785. 'EET',
  786. 'EST',
  787. 'EST5EDT',
  788. 'Egypt',
  789. 'Eire',
  790. 'Etc/GMT',
  791. 'Etc/GMT+0',
  792. 'Etc/GMT+1',
  793. 'Etc/GMT+10',
  794. 'Etc/GMT+11',
  795. 'Etc/GMT+12',
  796. 'Etc/GMT+2',
  797. 'Etc/GMT+3',
  798. 'Etc/GMT+4',
  799. 'Etc/GMT+5',
  800. 'Etc/GMT+6',
  801. 'Etc/GMT+7',
  802. 'Etc/GMT+8',
  803. 'Etc/GMT+9',
  804. 'Etc/GMT-0',
  805. 'Etc/GMT-1',
  806. 'Etc/GMT-10',
  807. 'Etc/GMT-11',
  808. 'Etc/GMT-12',
  809. 'Etc/GMT-13',
  810. 'Etc/GMT-14',
  811. 'Etc/GMT-2',
  812. 'Etc/GMT-3',
  813. 'Etc/GMT-4',
  814. 'Etc/GMT-5',
  815. 'Etc/GMT-6',
  816. 'Etc/GMT-7',
  817. 'Etc/GMT-8',
  818. 'Etc/GMT-9',
  819. 'Etc/GMT0',
  820. 'Etc/Greenwich',
  821. 'Etc/UCT',
  822. 'Etc/UTC',
  823. 'Etc/Universal',
  824. 'Etc/Zulu',
  825. 'Europe/Amsterdam',
  826. 'Europe/Andorra',
  827. 'Europe/Astrakhan',
  828. 'Europe/Athens',
  829. 'Europe/Belfast',
  830. 'Europe/Belgrade',
  831. 'Europe/Berlin',
  832. 'Europe/Bratislava',
  833. 'Europe/Brussels',
  834. 'Europe/Bucharest',
  835. 'Europe/Budapest',
  836. 'Europe/Busingen',
  837. 'Europe/Chisinau',
  838. 'Europe/Copenhagen',
  839. 'Europe/Dublin',
  840. 'Europe/Gibraltar',
  841. 'Europe/Guernsey',
  842. 'Europe/Helsinki',
  843. 'Europe/Isle_of_Man',
  844. 'Europe/Istanbul',
  845. 'Europe/Jersey',
  846. 'Europe/Kaliningrad',
  847. 'Europe/Kiev',
  848. 'Europe/Kirov',
  849. 'Europe/Lisbon',
  850. 'Europe/Ljubljana',
  851. 'Europe/London',
  852. 'Europe/Luxembourg',
  853. 'Europe/Madrid',
  854. 'Europe/Malta',
  855. 'Europe/Mariehamn',
  856. 'Europe/Minsk',
  857. 'Europe/Monaco',
  858. 'Europe/Moscow',
  859. 'Europe/Nicosia',
  860. 'Europe/Oslo',
  861. 'Europe/Paris',
  862. 'Europe/Podgorica',
  863. 'Europe/Prague',
  864. 'Europe/Riga',
  865. 'Europe/Rome',
  866. 'Europe/Samara',
  867. 'Europe/San_Marino',
  868. 'Europe/Sarajevo',
  869. 'Europe/Saratov',
  870. 'Europe/Simferopol',
  871. 'Europe/Skopje',
  872. 'Europe/Sofia',
  873. 'Europe/Stockholm',
  874. 'Europe/Tallinn',
  875. 'Europe/Tirane',
  876. 'Europe/Tiraspol',
  877. 'Europe/Ulyanovsk',
  878. 'Europe/Uzhgorod',
  879. 'Europe/Vaduz',
  880. 'Europe/Vatican',
  881. 'Europe/Vienna',
  882. 'Europe/Vilnius',
  883. 'Europe/Volgograd',
  884. 'Europe/Warsaw',
  885. 'Europe/Zagreb',
  886. 'Europe/Zaporozhye',
  887. 'Europe/Zurich',
  888. 'GB',
  889. 'GB-Eire',
  890. 'GMT',
  891. 'GMT+0',
  892. 'GMT-0',
  893. 'GMT0',
  894. 'Greenwich',
  895. 'HST',
  896. 'Hongkong',
  897. 'Iceland',
  898. 'Indian/Antananarivo',
  899. 'Indian/Chagos',
  900. 'Indian/Christmas',
  901. 'Indian/Cocos',
  902. 'Indian/Comoro',
  903. 'Indian/Kerguelen',
  904. 'Indian/Mahe',
  905. 'Indian/Maldives',
  906. 'Indian/Mauritius',
  907. 'Indian/Mayotte',
  908. 'Indian/Reunion',
  909. 'Iran',
  910. 'Israel',
  911. 'Jamaica',
  912. 'Japan',
  913. 'Kwajalein',
  914. 'Libya',
  915. 'MET',
  916. 'MST',
  917. 'MST7MDT',
  918. 'Mexico/BajaNorte',
  919. 'Mexico/BajaSur',
  920. 'Mexico/General',
  921. 'NZ',
  922. 'NZ-CHAT',
  923. 'Navajo',
  924. 'PRC',
  925. 'PST8PDT',
  926. 'Pacific/Apia',
  927. 'Pacific/Auckland',
  928. 'Pacific/Bougainville',
  929. 'Pacific/Chatham',
  930. 'Pacific/Chuuk',
  931. 'Pacific/Easter',
  932. 'Pacific/Efate',
  933. 'Pacific/Enderbury',
  934. 'Pacific/Fakaofo',
  935. 'Pacific/Fiji',
  936. 'Pacific/Funafuti',
  937. 'Pacific/Galapagos',
  938. 'Pacific/Gambier',
  939. 'Pacific/Guadalcanal',
  940. 'Pacific/Guam',
  941. 'Pacific/Honolulu',
  942. 'Pacific/Johnston',
  943. 'Pacific/Kiritimati',
  944. 'Pacific/Kosrae',
  945. 'Pacific/Kwajalein',
  946. 'Pacific/Majuro',
  947. 'Pacific/Marquesas',
  948. 'Pacific/Midway',
  949. 'Pacific/Nauru',
  950. 'Pacific/Niue',
  951. 'Pacific/Norfolk',
  952. 'Pacific/Noumea',
  953. 'Pacific/Pago_Pago',
  954. 'Pacific/Palau',
  955. 'Pacific/Pitcairn',
  956. 'Pacific/Pohnpei',
  957. 'Pacific/Ponape',
  958. 'Pacific/Port_Moresby',
  959. 'Pacific/Rarotonga',
  960. 'Pacific/Saipan',
  961. 'Pacific/Samoa',
  962. 'Pacific/Tahiti',
  963. 'Pacific/Tarawa',
  964. 'Pacific/Tongatapu',
  965. 'Pacific/Truk',
  966. 'Pacific/Wake',
  967. 'Pacific/Wallis',
  968. 'Pacific/Yap',
  969. 'Poland',
  970. 'Portugal',
  971. 'ROC',
  972. 'ROK',
  973. 'Singapore',
  974. 'Turkey',
  975. 'UCT',
  976. 'US/Alaska',
  977. 'US/Aleutian',
  978. 'US/Arizona',
  979. 'US/Central',
  980. 'US/East-Indiana',
  981. 'US/Eastern',
  982. 'US/Hawaii',
  983. 'US/Indiana-Starke',
  984. 'US/Michigan',
  985. 'US/Mountain',
  986. 'US/Pacific',
  987. 'US/Samoa',
  988. 'UTC',
  989. 'Universal',
  990. 'W-SU',
  991. 'WET',
  992. 'Zulu']
  993. all_timezones = LazyList(
  994. tz for tz in all_timezones if resource_exists(tz))
  995. all_timezones_set = LazySet(all_timezones)
  996. common_timezones = \
  997. ['Africa/Abidjan',
  998. 'Africa/Accra',
  999. 'Africa/Addis_Ababa',
  1000. 'Africa/Algiers',
  1001. 'Africa/Asmara',
  1002. 'Africa/Bamako',
  1003. 'Africa/Bangui',
  1004. 'Africa/Banjul',
  1005. 'Africa/Bissau',
  1006. 'Africa/Blantyre',
  1007. 'Africa/Brazzaville',
  1008. 'Africa/Bujumbura',
  1009. 'Africa/Cairo',
  1010. 'Africa/Casablanca',
  1011. 'Africa/Ceuta',
  1012. 'Africa/Conakry',
  1013. 'Africa/Dakar',
  1014. 'Africa/Dar_es_Salaam',
  1015. 'Africa/Djibouti',
  1016. 'Africa/Douala',
  1017. 'Africa/El_Aaiun',
  1018. 'Africa/Freetown',
  1019. 'Africa/Gaborone',
  1020. 'Africa/Harare',
  1021. 'Africa/Johannesburg',
  1022. 'Africa/Juba',
  1023. 'Africa/Kampala',
  1024. 'Africa/Khartoum',
  1025. 'Africa/Kigali',
  1026. 'Africa/Kinshasa',
  1027. 'Africa/Lagos',
  1028. 'Africa/Libreville',
  1029. 'Africa/Lome',
  1030. 'Africa/Luanda',
  1031. 'Africa/Lubumbashi',
  1032. 'Africa/Lusaka',
  1033. 'Africa/Malabo',
  1034. 'Africa/Maputo',
  1035. 'Africa/Maseru',
  1036. 'Africa/Mbabane',
  1037. 'Africa/Mogadishu',
  1038. 'Africa/Monrovia',
  1039. 'Africa/Nairobi',
  1040. 'Africa/Ndjamena',
  1041. 'Africa/Niamey',
  1042. 'Africa/Nouakchott',
  1043. 'Africa/Ouagadougou',
  1044. 'Africa/Porto-Novo',
  1045. 'Africa/Sao_Tome',
  1046. 'Africa/Tripoli',
  1047. 'Africa/Tunis',
  1048. 'Africa/Windhoek',
  1049. 'America/Adak',
  1050. 'America/Anchorage',
  1051. 'America/Anguilla',
  1052. 'America/Antigua',
  1053. 'America/Araguaina',
  1054. 'America/Argentina/Buenos_Aires',
  1055. 'America/Argentina/Catamarca',
  1056. 'America/Argentina/Cordoba',
  1057. 'America/Argentina/Jujuy',
  1058. 'America/Argentina/La_Rioja',
  1059. 'America/Argentina/Mendoza',
  1060. 'America/Argentina/Rio_Gallegos',
  1061. 'America/Argentina/Salta',
  1062. 'America/Argentina/San_Juan',
  1063. 'America/Argentina/San_Luis',
  1064. 'America/Argentina/Tucuman',
  1065. 'America/Argentina/Ushuaia',
  1066. 'America/Aruba',
  1067. 'America/Asuncion',
  1068. 'America/Atikokan',
  1069. 'America/Bahia',
  1070. 'America/Bahia_Banderas',
  1071. 'America/Barbados',
  1072. 'America/Belem',
  1073. 'America/Belize',
  1074. 'America/Blanc-Sablon',
  1075. 'America/Boa_Vista',
  1076. 'America/Bogota',
  1077. 'America/Boise',
  1078. 'America/Cambridge_Bay',
  1079. 'America/Campo_Grande',
  1080. 'America/Cancun',
  1081. 'America/Caracas',
  1082. 'America/Cayenne',
  1083. 'America/Cayman',
  1084. 'America/Chicago',
  1085. 'America/Chihuahua',
  1086. 'America/Costa_Rica',
  1087. 'America/Creston',
  1088. 'America/Cuiaba',
  1089. 'America/Curacao',
  1090. 'America/Danmarkshavn',
  1091. 'America/Dawson',
  1092. 'America/Dawson_Creek',
  1093. 'America/Denver',
  1094. 'America/Detroit',
  1095. 'America/Dominica',
  1096. 'America/Edmonton',
  1097. 'America/Eirunepe',
  1098. 'America/El_Salvador',
  1099. 'America/Fort_Nelson',
  1100. 'America/Fortaleza',
  1101. 'America/Glace_Bay',
  1102. 'America/Goose_Bay',
  1103. 'America/Grand_Turk',
  1104. 'America/Grenada',
  1105. 'America/Guadeloupe',
  1106. 'America/Guatemala',
  1107. 'America/Guayaquil',
  1108. 'America/Guyana',
  1109. 'America/Halifax',
  1110. 'America/Havana',
  1111. 'America/Hermosillo',
  1112. 'America/Indiana/Indianapolis',
  1113. 'America/Indiana/Knox',
  1114. 'America/Indiana/Marengo',
  1115. 'America/Indiana/Petersburg',
  1116. 'America/Indiana/Tell_City',
  1117. 'America/Indiana/Vevay',
  1118. 'America/Indiana/Vincennes',
  1119. 'America/Indiana/Winamac',
  1120. 'America/Inuvik',
  1121. 'America/Iqaluit',
  1122. 'America/Jamaica',
  1123. 'America/Juneau',
  1124. 'America/Kentucky/Louisville',
  1125. 'America/Kentucky/Monticello',
  1126. 'America/Kralendijk',
  1127. 'America/La_Paz',
  1128. 'America/Lima',
  1129. 'America/Los_Angeles',
  1130. 'America/Lower_Princes',
  1131. 'America/Maceio',
  1132. 'America/Managua',
  1133. 'America/Manaus',
  1134. 'America/Marigot',
  1135. 'America/Martinique',
  1136. 'America/Matamoros',
  1137. 'America/Mazatlan',
  1138. 'America/Menominee',
  1139. 'America/Merida',
  1140. 'America/Metlakatla',
  1141. 'America/Mexico_City',
  1142. 'America/Miquelon',
  1143. 'America/Moncton',
  1144. 'America/Monterrey',
  1145. 'America/Montevideo',
  1146. 'America/Montserrat',
  1147. 'America/Nassau',
  1148. 'America/New_York',
  1149. 'America/Nipigon',
  1150. 'America/Nome',
  1151. 'America/Noronha',
  1152. 'America/North_Dakota/Beulah',
  1153. 'America/North_Dakota/Center',
  1154. 'America/North_Dakota/New_Salem',
  1155. 'America/Nuuk',
  1156. 'America/Ojinaga',
  1157. 'America/Panama',
  1158. 'America/Pangnirtung',
  1159. 'America/Paramaribo',
  1160. 'America/Phoenix',
  1161. 'America/Port-au-Prince',
  1162. 'America/Port_of_Spain',
  1163. 'America/Porto_Velho',
  1164. 'America/Puerto_Rico',
  1165. 'America/Punta_Arenas',
  1166. 'America/Rainy_River',
  1167. 'America/Rankin_Inlet',
  1168. 'America/Recife',
  1169. 'America/Regina',
  1170. 'America/Resolute',
  1171. 'America/Rio_Branco',
  1172. 'America/Santarem',
  1173. 'America/Santiago',
  1174. 'America/Santo_Domingo',
  1175. 'America/Sao_Paulo',
  1176. 'America/Scoresbysund',
  1177. 'America/Sitka',
  1178. 'America/St_Barthelemy',
  1179. 'America/St_Johns',
  1180. 'America/St_Kitts',
  1181. 'America/St_Lucia',
  1182. 'America/St_Thomas',
  1183. 'America/St_Vincent',
  1184. 'America/Swift_Current',
  1185. 'America/Tegucigalpa',
  1186. 'America/Thule',
  1187. 'America/Thunder_Bay',
  1188. 'America/Tijuana',
  1189. 'America/Toronto',
  1190. 'America/Tortola',
  1191. 'America/Vancouver',
  1192. 'America/Whitehorse',
  1193. 'America/Winnipeg',
  1194. 'America/Yakutat',
  1195. 'America/Yellowknife',
  1196. 'Antarctica/Casey',
  1197. 'Antarctica/Davis',
  1198. 'Antarctica/DumontDUrville',
  1199. 'Antarctica/Macquarie',
  1200. 'Antarctica/Mawson',
  1201. 'Antarctica/McMurdo',
  1202. 'Antarctica/Palmer',
  1203. 'Antarctica/Rothera',
  1204. 'Antarctica/Syowa',
  1205. 'Antarctica/Troll',
  1206. 'Antarctica/Vostok',
  1207. 'Arctic/Longyearbyen',
  1208. 'Asia/Aden',
  1209. 'Asia/Almaty',
  1210. 'Asia/Amman',
  1211. 'Asia/Anadyr',
  1212. 'Asia/Aqtau',
  1213. 'Asia/Aqtobe',
  1214. 'Asia/Ashgabat',
  1215. 'Asia/Atyrau',
  1216. 'Asia/Baghdad',
  1217. 'Asia/Bahrain',
  1218. 'Asia/Baku',
  1219. 'Asia/Bangkok',
  1220. 'Asia/Barnaul',
  1221. 'Asia/Beirut',
  1222. 'Asia/Bishkek',
  1223. 'Asia/Brunei',
  1224. 'Asia/Chita',
  1225. 'Asia/Choibalsan',
  1226. 'Asia/Colombo',
  1227. 'Asia/Damascus',
  1228. 'Asia/Dhaka',
  1229. 'Asia/Dili',
  1230. 'Asia/Dubai',
  1231. 'Asia/Dushanbe',
  1232. 'Asia/Famagusta',
  1233. 'Asia/Gaza',
  1234. 'Asia/Hebron',
  1235. 'Asia/Ho_Chi_Minh',
  1236. 'Asia/Hong_Kong',
  1237. 'Asia/Hovd',
  1238. 'Asia/Irkutsk',
  1239. 'Asia/Jakarta',
  1240. 'Asia/Jayapura',
  1241. 'Asia/Jerusalem',
  1242. 'Asia/Kabul',
  1243. 'Asia/Kamchatka',
  1244. 'Asia/Karachi',
  1245. 'Asia/Kathmandu',
  1246. 'Asia/Khandyga',
  1247. 'Asia/Kolkata',
  1248. 'Asia/Krasnoyarsk',
  1249. 'Asia/Kuala_Lumpur',
  1250. 'Asia/Kuching',
  1251. 'Asia/Kuwait',
  1252. 'Asia/Macau',
  1253. 'Asia/Magadan',
  1254. 'Asia/Makassar',
  1255. 'Asia/Manila',
  1256. 'Asia/Muscat',
  1257. 'Asia/Nicosia',
  1258. 'Asia/Novokuznetsk',
  1259. 'Asia/Novosibirsk',
  1260. 'Asia/Omsk',
  1261. 'Asia/Oral',
  1262. 'Asia/Phnom_Penh',
  1263. 'Asia/Pontianak',
  1264. 'Asia/Pyongyang',
  1265. 'Asia/Qatar',
  1266. 'Asia/Qostanay',
  1267. 'Asia/Qyzylorda',
  1268. 'Asia/Riyadh',
  1269. 'Asia/Sakhalin',
  1270. 'Asia/Samarkand',
  1271. 'Asia/Seoul',
  1272. 'Asia/Shanghai',
  1273. 'Asia/Singapore',
  1274. 'Asia/Srednekolymsk',
  1275. 'Asia/Taipei',
  1276. 'Asia/Tashkent',
  1277. 'Asia/Tbilisi',
  1278. 'Asia/Tehran',
  1279. 'Asia/Thimphu',
  1280. 'Asia/Tokyo',
  1281. 'Asia/Tomsk',
  1282. 'Asia/Ulaanbaatar',
  1283. 'Asia/Urumqi',
  1284. 'Asia/Ust-Nera',
  1285. 'Asia/Vientiane',
  1286. 'Asia/Vladivostok',
  1287. 'Asia/Yakutsk',
  1288. 'Asia/Yangon',
  1289. 'Asia/Yekaterinburg',
  1290. 'Asia/Yerevan',
  1291. 'Atlantic/Azores',
  1292. 'Atlantic/Bermuda',
  1293. 'Atlantic/Canary',
  1294. 'Atlantic/Cape_Verde',
  1295. 'Atlantic/Faroe',
  1296. 'Atlantic/Madeira',
  1297. 'Atlantic/Reykjavik',
  1298. 'Atlantic/South_Georgia',
  1299. 'Atlantic/St_Helena',
  1300. 'Atlantic/Stanley',
  1301. 'Australia/Adelaide',
  1302. 'Australia/Brisbane',
  1303. 'Australia/Broken_Hill',
  1304. 'Australia/Darwin',
  1305. 'Australia/Eucla',
  1306. 'Australia/Hobart',
  1307. 'Australia/Lindeman',
  1308. 'Australia/Lord_Howe',
  1309. 'Australia/Melbourne',
  1310. 'Australia/Perth',
  1311. 'Australia/Sydney',
  1312. 'Canada/Atlantic',
  1313. 'Canada/Central',
  1314. 'Canada/Eastern',
  1315. 'Canada/Mountain',
  1316. 'Canada/Newfoundland',
  1317. 'Canada/Pacific',
  1318. 'Europe/Amsterdam',
  1319. 'Europe/Andorra',
  1320. 'Europe/Astrakhan',
  1321. 'Europe/Athens',
  1322. 'Europe/Belgrade',
  1323. 'Europe/Berlin',
  1324. 'Europe/Bratislava',
  1325. 'Europe/Brussels',
  1326. 'Europe/Bucharest',
  1327. 'Europe/Budapest',
  1328. 'Europe/Busingen',
  1329. 'Europe/Chisinau',
  1330. 'Europe/Copenhagen',
  1331. 'Europe/Dublin',
  1332. 'Europe/Gibraltar',
  1333. 'Europe/Guernsey',
  1334. 'Europe/Helsinki',
  1335. 'Europe/Isle_of_Man',
  1336. 'Europe/Istanbul',
  1337. 'Europe/Jersey',
  1338. 'Europe/Kaliningrad',
  1339. 'Europe/Kiev',
  1340. 'Europe/Kirov',
  1341. 'Europe/Lisbon',
  1342. 'Europe/Ljubljana',
  1343. 'Europe/London',
  1344. 'Europe/Luxembourg',
  1345. 'Europe/Madrid',
  1346. 'Europe/Malta',
  1347. 'Europe/Mariehamn',
  1348. 'Europe/Minsk',
  1349. 'Europe/Monaco',
  1350. 'Europe/Moscow',
  1351. 'Europe/Oslo',
  1352. 'Europe/Paris',
  1353. 'Europe/Podgorica',
  1354. 'Europe/Prague',
  1355. 'Europe/Riga',
  1356. 'Europe/Rome',
  1357. 'Europe/Samara',
  1358. 'Europe/San_Marino',
  1359. 'Europe/Sarajevo',
  1360. 'Europe/Saratov',
  1361. 'Europe/Simferopol',
  1362. 'Europe/Skopje',
  1363. 'Europe/Sofia',
  1364. 'Europe/Stockholm',
  1365. 'Europe/Tallinn',
  1366. 'Europe/Tirane',
  1367. 'Europe/Ulyanovsk',
  1368. 'Europe/Uzhgorod',
  1369. 'Europe/Vaduz',
  1370. 'Europe/Vatican',
  1371. 'Europe/Vienna',
  1372. 'Europe/Vilnius',
  1373. 'Europe/Volgograd',
  1374. 'Europe/Warsaw',
  1375. 'Europe/Zagreb',
  1376. 'Europe/Zaporozhye',
  1377. 'Europe/Zurich',
  1378. 'GMT',
  1379. 'Indian/Antananarivo',
  1380. 'Indian/Chagos',
  1381. 'Indian/Christmas',
  1382. 'Indian/Cocos',
  1383. 'Indian/Comoro',
  1384. 'Indian/Kerguelen',
  1385. 'Indian/Mahe',
  1386. 'Indian/Maldives',
  1387. 'Indian/Mauritius',
  1388. 'Indian/Mayotte',
  1389. 'Indian/Reunion',
  1390. 'Pacific/Apia',
  1391. 'Pacific/Auckland',
  1392. 'Pacific/Bougainville',
  1393. 'Pacific/Chatham',
  1394. 'Pacific/Chuuk',
  1395. 'Pacific/Easter',
  1396. 'Pacific/Efate',
  1397. 'Pacific/Enderbury',
  1398. 'Pacific/Fakaofo',
  1399. 'Pacific/Fiji',
  1400. 'Pacific/Funafuti',
  1401. 'Pacific/Galapagos',
  1402. 'Pacific/Gambier',
  1403. 'Pacific/Guadalcanal',
  1404. 'Pacific/Guam',
  1405. 'Pacific/Honolulu',
  1406. 'Pacific/Kiritimati',
  1407. 'Pacific/Kosrae',
  1408. 'Pacific/Kwajalein',
  1409. 'Pacific/Majuro',
  1410. 'Pacific/Marquesas',
  1411. 'Pacific/Midway',
  1412. 'Pacific/Nauru',
  1413. 'Pacific/Niue',
  1414. 'Pacific/Norfolk',
  1415. 'Pacific/Noumea',
  1416. 'Pacific/Pago_Pago',
  1417. 'Pacific/Palau',
  1418. 'Pacific/Pitcairn',
  1419. 'Pacific/Pohnpei',
  1420. 'Pacific/Port_Moresby',
  1421. 'Pacific/Rarotonga',
  1422. 'Pacific/Saipan',
  1423. 'Pacific/Tahiti',
  1424. 'Pacific/Tarawa',
  1425. 'Pacific/Tongatapu',
  1426. 'Pacific/Wake',
  1427. 'Pacific/Wallis',
  1428. 'US/Alaska',
  1429. 'US/Arizona',
  1430. 'US/Central',
  1431. 'US/Eastern',
  1432. 'US/Hawaii',
  1433. 'US/Mountain',
  1434. 'US/Pacific',
  1435. 'UTC']
  1436. common_timezones = LazyList(
  1437. tz for tz in common_timezones if tz in all_timezones)
  1438. common_timezones_set = LazySet(common_timezones)