__init__.py 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559
  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 = '2021c'
  20. VERSION = '2021.3' # 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/Kanton',
  944. 'Pacific/Kiritimati',
  945. 'Pacific/Kosrae',
  946. 'Pacific/Kwajalein',
  947. 'Pacific/Majuro',
  948. 'Pacific/Marquesas',
  949. 'Pacific/Midway',
  950. 'Pacific/Nauru',
  951. 'Pacific/Niue',
  952. 'Pacific/Norfolk',
  953. 'Pacific/Noumea',
  954. 'Pacific/Pago_Pago',
  955. 'Pacific/Palau',
  956. 'Pacific/Pitcairn',
  957. 'Pacific/Pohnpei',
  958. 'Pacific/Ponape',
  959. 'Pacific/Port_Moresby',
  960. 'Pacific/Rarotonga',
  961. 'Pacific/Saipan',
  962. 'Pacific/Samoa',
  963. 'Pacific/Tahiti',
  964. 'Pacific/Tarawa',
  965. 'Pacific/Tongatapu',
  966. 'Pacific/Truk',
  967. 'Pacific/Wake',
  968. 'Pacific/Wallis',
  969. 'Pacific/Yap',
  970. 'Poland',
  971. 'Portugal',
  972. 'ROC',
  973. 'ROK',
  974. 'Singapore',
  975. 'Turkey',
  976. 'UCT',
  977. 'US/Alaska',
  978. 'US/Aleutian',
  979. 'US/Arizona',
  980. 'US/Central',
  981. 'US/East-Indiana',
  982. 'US/Eastern',
  983. 'US/Hawaii',
  984. 'US/Indiana-Starke',
  985. 'US/Michigan',
  986. 'US/Mountain',
  987. 'US/Pacific',
  988. 'US/Samoa',
  989. 'UTC',
  990. 'Universal',
  991. 'W-SU',
  992. 'WET',
  993. 'Zulu']
  994. all_timezones = LazyList(
  995. tz for tz in all_timezones if resource_exists(tz))
  996. all_timezones_set = LazySet(all_timezones)
  997. common_timezones = \
  998. ['Africa/Abidjan',
  999. 'Africa/Accra',
  1000. 'Africa/Addis_Ababa',
  1001. 'Africa/Algiers',
  1002. 'Africa/Asmara',
  1003. 'Africa/Bamako',
  1004. 'Africa/Bangui',
  1005. 'Africa/Banjul',
  1006. 'Africa/Bissau',
  1007. 'Africa/Blantyre',
  1008. 'Africa/Brazzaville',
  1009. 'Africa/Bujumbura',
  1010. 'Africa/Cairo',
  1011. 'Africa/Casablanca',
  1012. 'Africa/Ceuta',
  1013. 'Africa/Conakry',
  1014. 'Africa/Dakar',
  1015. 'Africa/Dar_es_Salaam',
  1016. 'Africa/Djibouti',
  1017. 'Africa/Douala',
  1018. 'Africa/El_Aaiun',
  1019. 'Africa/Freetown',
  1020. 'Africa/Gaborone',
  1021. 'Africa/Harare',
  1022. 'Africa/Johannesburg',
  1023. 'Africa/Juba',
  1024. 'Africa/Kampala',
  1025. 'Africa/Khartoum',
  1026. 'Africa/Kigali',
  1027. 'Africa/Kinshasa',
  1028. 'Africa/Lagos',
  1029. 'Africa/Libreville',
  1030. 'Africa/Lome',
  1031. 'Africa/Luanda',
  1032. 'Africa/Lubumbashi',
  1033. 'Africa/Lusaka',
  1034. 'Africa/Malabo',
  1035. 'Africa/Maputo',
  1036. 'Africa/Maseru',
  1037. 'Africa/Mbabane',
  1038. 'Africa/Mogadishu',
  1039. 'Africa/Monrovia',
  1040. 'Africa/Nairobi',
  1041. 'Africa/Ndjamena',
  1042. 'Africa/Niamey',
  1043. 'Africa/Nouakchott',
  1044. 'Africa/Ouagadougou',
  1045. 'Africa/Porto-Novo',
  1046. 'Africa/Sao_Tome',
  1047. 'Africa/Tripoli',
  1048. 'Africa/Tunis',
  1049. 'Africa/Windhoek',
  1050. 'America/Adak',
  1051. 'America/Anchorage',
  1052. 'America/Anguilla',
  1053. 'America/Antigua',
  1054. 'America/Araguaina',
  1055. 'America/Argentina/Buenos_Aires',
  1056. 'America/Argentina/Catamarca',
  1057. 'America/Argentina/Cordoba',
  1058. 'America/Argentina/Jujuy',
  1059. 'America/Argentina/La_Rioja',
  1060. 'America/Argentina/Mendoza',
  1061. 'America/Argentina/Rio_Gallegos',
  1062. 'America/Argentina/Salta',
  1063. 'America/Argentina/San_Juan',
  1064. 'America/Argentina/San_Luis',
  1065. 'America/Argentina/Tucuman',
  1066. 'America/Argentina/Ushuaia',
  1067. 'America/Aruba',
  1068. 'America/Asuncion',
  1069. 'America/Atikokan',
  1070. 'America/Bahia',
  1071. 'America/Bahia_Banderas',
  1072. 'America/Barbados',
  1073. 'America/Belem',
  1074. 'America/Belize',
  1075. 'America/Blanc-Sablon',
  1076. 'America/Boa_Vista',
  1077. 'America/Bogota',
  1078. 'America/Boise',
  1079. 'America/Cambridge_Bay',
  1080. 'America/Campo_Grande',
  1081. 'America/Cancun',
  1082. 'America/Caracas',
  1083. 'America/Cayenne',
  1084. 'America/Cayman',
  1085. 'America/Chicago',
  1086. 'America/Chihuahua',
  1087. 'America/Costa_Rica',
  1088. 'America/Creston',
  1089. 'America/Cuiaba',
  1090. 'America/Curacao',
  1091. 'America/Danmarkshavn',
  1092. 'America/Dawson',
  1093. 'America/Dawson_Creek',
  1094. 'America/Denver',
  1095. 'America/Detroit',
  1096. 'America/Dominica',
  1097. 'America/Edmonton',
  1098. 'America/Eirunepe',
  1099. 'America/El_Salvador',
  1100. 'America/Fort_Nelson',
  1101. 'America/Fortaleza',
  1102. 'America/Glace_Bay',
  1103. 'America/Goose_Bay',
  1104. 'America/Grand_Turk',
  1105. 'America/Grenada',
  1106. 'America/Guadeloupe',
  1107. 'America/Guatemala',
  1108. 'America/Guayaquil',
  1109. 'America/Guyana',
  1110. 'America/Halifax',
  1111. 'America/Havana',
  1112. 'America/Hermosillo',
  1113. 'America/Indiana/Indianapolis',
  1114. 'America/Indiana/Knox',
  1115. 'America/Indiana/Marengo',
  1116. 'America/Indiana/Petersburg',
  1117. 'America/Indiana/Tell_City',
  1118. 'America/Indiana/Vevay',
  1119. 'America/Indiana/Vincennes',
  1120. 'America/Indiana/Winamac',
  1121. 'America/Inuvik',
  1122. 'America/Iqaluit',
  1123. 'America/Jamaica',
  1124. 'America/Juneau',
  1125. 'America/Kentucky/Louisville',
  1126. 'America/Kentucky/Monticello',
  1127. 'America/Kralendijk',
  1128. 'America/La_Paz',
  1129. 'America/Lima',
  1130. 'America/Los_Angeles',
  1131. 'America/Lower_Princes',
  1132. 'America/Maceio',
  1133. 'America/Managua',
  1134. 'America/Manaus',
  1135. 'America/Marigot',
  1136. 'America/Martinique',
  1137. 'America/Matamoros',
  1138. 'America/Mazatlan',
  1139. 'America/Menominee',
  1140. 'America/Merida',
  1141. 'America/Metlakatla',
  1142. 'America/Mexico_City',
  1143. 'America/Miquelon',
  1144. 'America/Moncton',
  1145. 'America/Monterrey',
  1146. 'America/Montevideo',
  1147. 'America/Montserrat',
  1148. 'America/Nassau',
  1149. 'America/New_York',
  1150. 'America/Nipigon',
  1151. 'America/Nome',
  1152. 'America/Noronha',
  1153. 'America/North_Dakota/Beulah',
  1154. 'America/North_Dakota/Center',
  1155. 'America/North_Dakota/New_Salem',
  1156. 'America/Nuuk',
  1157. 'America/Ojinaga',
  1158. 'America/Panama',
  1159. 'America/Pangnirtung',
  1160. 'America/Paramaribo',
  1161. 'America/Phoenix',
  1162. 'America/Port-au-Prince',
  1163. 'America/Port_of_Spain',
  1164. 'America/Porto_Velho',
  1165. 'America/Puerto_Rico',
  1166. 'America/Punta_Arenas',
  1167. 'America/Rainy_River',
  1168. 'America/Rankin_Inlet',
  1169. 'America/Recife',
  1170. 'America/Regina',
  1171. 'America/Resolute',
  1172. 'America/Rio_Branco',
  1173. 'America/Santarem',
  1174. 'America/Santiago',
  1175. 'America/Santo_Domingo',
  1176. 'America/Sao_Paulo',
  1177. 'America/Scoresbysund',
  1178. 'America/Sitka',
  1179. 'America/St_Barthelemy',
  1180. 'America/St_Johns',
  1181. 'America/St_Kitts',
  1182. 'America/St_Lucia',
  1183. 'America/St_Thomas',
  1184. 'America/St_Vincent',
  1185. 'America/Swift_Current',
  1186. 'America/Tegucigalpa',
  1187. 'America/Thule',
  1188. 'America/Thunder_Bay',
  1189. 'America/Tijuana',
  1190. 'America/Toronto',
  1191. 'America/Tortola',
  1192. 'America/Vancouver',
  1193. 'America/Whitehorse',
  1194. 'America/Winnipeg',
  1195. 'America/Yakutat',
  1196. 'America/Yellowknife',
  1197. 'Antarctica/Casey',
  1198. 'Antarctica/Davis',
  1199. 'Antarctica/DumontDUrville',
  1200. 'Antarctica/Macquarie',
  1201. 'Antarctica/Mawson',
  1202. 'Antarctica/McMurdo',
  1203. 'Antarctica/Palmer',
  1204. 'Antarctica/Rothera',
  1205. 'Antarctica/Syowa',
  1206. 'Antarctica/Troll',
  1207. 'Antarctica/Vostok',
  1208. 'Arctic/Longyearbyen',
  1209. 'Asia/Aden',
  1210. 'Asia/Almaty',
  1211. 'Asia/Amman',
  1212. 'Asia/Anadyr',
  1213. 'Asia/Aqtau',
  1214. 'Asia/Aqtobe',
  1215. 'Asia/Ashgabat',
  1216. 'Asia/Atyrau',
  1217. 'Asia/Baghdad',
  1218. 'Asia/Bahrain',
  1219. 'Asia/Baku',
  1220. 'Asia/Bangkok',
  1221. 'Asia/Barnaul',
  1222. 'Asia/Beirut',
  1223. 'Asia/Bishkek',
  1224. 'Asia/Brunei',
  1225. 'Asia/Chita',
  1226. 'Asia/Choibalsan',
  1227. 'Asia/Colombo',
  1228. 'Asia/Damascus',
  1229. 'Asia/Dhaka',
  1230. 'Asia/Dili',
  1231. 'Asia/Dubai',
  1232. 'Asia/Dushanbe',
  1233. 'Asia/Famagusta',
  1234. 'Asia/Gaza',
  1235. 'Asia/Hebron',
  1236. 'Asia/Ho_Chi_Minh',
  1237. 'Asia/Hong_Kong',
  1238. 'Asia/Hovd',
  1239. 'Asia/Irkutsk',
  1240. 'Asia/Jakarta',
  1241. 'Asia/Jayapura',
  1242. 'Asia/Jerusalem',
  1243. 'Asia/Kabul',
  1244. 'Asia/Kamchatka',
  1245. 'Asia/Karachi',
  1246. 'Asia/Kathmandu',
  1247. 'Asia/Khandyga',
  1248. 'Asia/Kolkata',
  1249. 'Asia/Krasnoyarsk',
  1250. 'Asia/Kuala_Lumpur',
  1251. 'Asia/Kuching',
  1252. 'Asia/Kuwait',
  1253. 'Asia/Macau',
  1254. 'Asia/Magadan',
  1255. 'Asia/Makassar',
  1256. 'Asia/Manila',
  1257. 'Asia/Muscat',
  1258. 'Asia/Nicosia',
  1259. 'Asia/Novokuznetsk',
  1260. 'Asia/Novosibirsk',
  1261. 'Asia/Omsk',
  1262. 'Asia/Oral',
  1263. 'Asia/Phnom_Penh',
  1264. 'Asia/Pontianak',
  1265. 'Asia/Pyongyang',
  1266. 'Asia/Qatar',
  1267. 'Asia/Qostanay',
  1268. 'Asia/Qyzylorda',
  1269. 'Asia/Riyadh',
  1270. 'Asia/Sakhalin',
  1271. 'Asia/Samarkand',
  1272. 'Asia/Seoul',
  1273. 'Asia/Shanghai',
  1274. 'Asia/Singapore',
  1275. 'Asia/Srednekolymsk',
  1276. 'Asia/Taipei',
  1277. 'Asia/Tashkent',
  1278. 'Asia/Tbilisi',
  1279. 'Asia/Tehran',
  1280. 'Asia/Thimphu',
  1281. 'Asia/Tokyo',
  1282. 'Asia/Tomsk',
  1283. 'Asia/Ulaanbaatar',
  1284. 'Asia/Urumqi',
  1285. 'Asia/Ust-Nera',
  1286. 'Asia/Vientiane',
  1287. 'Asia/Vladivostok',
  1288. 'Asia/Yakutsk',
  1289. 'Asia/Yangon',
  1290. 'Asia/Yekaterinburg',
  1291. 'Asia/Yerevan',
  1292. 'Atlantic/Azores',
  1293. 'Atlantic/Bermuda',
  1294. 'Atlantic/Canary',
  1295. 'Atlantic/Cape_Verde',
  1296. 'Atlantic/Faroe',
  1297. 'Atlantic/Madeira',
  1298. 'Atlantic/Reykjavik',
  1299. 'Atlantic/South_Georgia',
  1300. 'Atlantic/St_Helena',
  1301. 'Atlantic/Stanley',
  1302. 'Australia/Adelaide',
  1303. 'Australia/Brisbane',
  1304. 'Australia/Broken_Hill',
  1305. 'Australia/Darwin',
  1306. 'Australia/Eucla',
  1307. 'Australia/Hobart',
  1308. 'Australia/Lindeman',
  1309. 'Australia/Lord_Howe',
  1310. 'Australia/Melbourne',
  1311. 'Australia/Perth',
  1312. 'Australia/Sydney',
  1313. 'Canada/Atlantic',
  1314. 'Canada/Central',
  1315. 'Canada/Eastern',
  1316. 'Canada/Mountain',
  1317. 'Canada/Newfoundland',
  1318. 'Canada/Pacific',
  1319. 'Europe/Amsterdam',
  1320. 'Europe/Andorra',
  1321. 'Europe/Astrakhan',
  1322. 'Europe/Athens',
  1323. 'Europe/Belgrade',
  1324. 'Europe/Berlin',
  1325. 'Europe/Bratislava',
  1326. 'Europe/Brussels',
  1327. 'Europe/Bucharest',
  1328. 'Europe/Budapest',
  1329. 'Europe/Busingen',
  1330. 'Europe/Chisinau',
  1331. 'Europe/Copenhagen',
  1332. 'Europe/Dublin',
  1333. 'Europe/Gibraltar',
  1334. 'Europe/Guernsey',
  1335. 'Europe/Helsinki',
  1336. 'Europe/Isle_of_Man',
  1337. 'Europe/Istanbul',
  1338. 'Europe/Jersey',
  1339. 'Europe/Kaliningrad',
  1340. 'Europe/Kiev',
  1341. 'Europe/Kirov',
  1342. 'Europe/Lisbon',
  1343. 'Europe/Ljubljana',
  1344. 'Europe/London',
  1345. 'Europe/Luxembourg',
  1346. 'Europe/Madrid',
  1347. 'Europe/Malta',
  1348. 'Europe/Mariehamn',
  1349. 'Europe/Minsk',
  1350. 'Europe/Monaco',
  1351. 'Europe/Moscow',
  1352. 'Europe/Oslo',
  1353. 'Europe/Paris',
  1354. 'Europe/Podgorica',
  1355. 'Europe/Prague',
  1356. 'Europe/Riga',
  1357. 'Europe/Rome',
  1358. 'Europe/Samara',
  1359. 'Europe/San_Marino',
  1360. 'Europe/Sarajevo',
  1361. 'Europe/Saratov',
  1362. 'Europe/Simferopol',
  1363. 'Europe/Skopje',
  1364. 'Europe/Sofia',
  1365. 'Europe/Stockholm',
  1366. 'Europe/Tallinn',
  1367. 'Europe/Tirane',
  1368. 'Europe/Ulyanovsk',
  1369. 'Europe/Uzhgorod',
  1370. 'Europe/Vaduz',
  1371. 'Europe/Vatican',
  1372. 'Europe/Vienna',
  1373. 'Europe/Vilnius',
  1374. 'Europe/Volgograd',
  1375. 'Europe/Warsaw',
  1376. 'Europe/Zagreb',
  1377. 'Europe/Zaporozhye',
  1378. 'Europe/Zurich',
  1379. 'GMT',
  1380. 'Indian/Antananarivo',
  1381. 'Indian/Chagos',
  1382. 'Indian/Christmas',
  1383. 'Indian/Cocos',
  1384. 'Indian/Comoro',
  1385. 'Indian/Kerguelen',
  1386. 'Indian/Mahe',
  1387. 'Indian/Maldives',
  1388. 'Indian/Mauritius',
  1389. 'Indian/Mayotte',
  1390. 'Indian/Reunion',
  1391. 'Pacific/Apia',
  1392. 'Pacific/Auckland',
  1393. 'Pacific/Bougainville',
  1394. 'Pacific/Chatham',
  1395. 'Pacific/Chuuk',
  1396. 'Pacific/Easter',
  1397. 'Pacific/Efate',
  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/Kanton',
  1407. 'Pacific/Kiritimati',
  1408. 'Pacific/Kosrae',
  1409. 'Pacific/Kwajalein',
  1410. 'Pacific/Majuro',
  1411. 'Pacific/Marquesas',
  1412. 'Pacific/Midway',
  1413. 'Pacific/Nauru',
  1414. 'Pacific/Niue',
  1415. 'Pacific/Norfolk',
  1416. 'Pacific/Noumea',
  1417. 'Pacific/Pago_Pago',
  1418. 'Pacific/Palau',
  1419. 'Pacific/Pitcairn',
  1420. 'Pacific/Pohnpei',
  1421. 'Pacific/Port_Moresby',
  1422. 'Pacific/Rarotonga',
  1423. 'Pacific/Saipan',
  1424. 'Pacific/Tahiti',
  1425. 'Pacific/Tarawa',
  1426. 'Pacific/Tongatapu',
  1427. 'Pacific/Wake',
  1428. 'Pacific/Wallis',
  1429. 'US/Alaska',
  1430. 'US/Arizona',
  1431. 'US/Central',
  1432. 'US/Eastern',
  1433. 'US/Hawaii',
  1434. 'US/Mountain',
  1435. 'US/Pacific',
  1436. 'UTC']
  1437. common_timezones = LazyList(
  1438. tz for tz in common_timezones if tz in all_timezones)
  1439. common_timezones_set = LazySet(common_timezones)