DESCRIPTION.rst 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  1. pytz - World Timezone Definitions for Python
  2. ============================================
  3. :Author: Stuart Bishop <stuart@stuartbishop.net>
  4. Introduction
  5. ~~~~~~~~~~~~
  6. pytz brings the Olson tz database into Python. This library allows
  7. accurate and cross platform timezone calculations using Python 2.4
  8. or higher. It also solves the issue of ambiguous times at the end
  9. of daylight saving time, which you can read more about in the Python
  10. Library Reference (``datetime.tzinfo``).
  11. Almost all of the Olson timezones are supported.
  12. .. note::
  13. This library differs from the documented Python API for
  14. tzinfo implementations; if you want to create local wallclock
  15. times you need to use the ``localize()`` method documented in this
  16. document. In addition, if you perform date arithmetic on local
  17. times that cross DST boundaries, the result may be in an incorrect
  18. timezone (ie. subtract 1 minute from 2002-10-27 1:00 EST and you get
  19. 2002-10-27 0:59 EST instead of the correct 2002-10-27 1:59 EDT). A
  20. ``normalize()`` method is provided to correct this. Unfortunately these
  21. issues cannot be resolved without modifying the Python datetime
  22. implementation (see PEP-431).
  23. Installation
  24. ~~~~~~~~~~~~
  25. This package can either be installed using ``pip`` or from a tarball using the
  26. standard Python distutils.
  27. If you are installing using ``pip``, you don't need to download anything as the
  28. latest version will be downloaded for you from PyPI::
  29. pip install pytz
  30. If you are installing from a tarball, run the following command as an
  31. administrative user::
  32. python setup.py install
  33. pytz for Enterprise
  34. ~~~~~~~~~~~~~~~~~~~
  35. Available as part of the Tidelift Subscription.
  36. The maintainers of pytz and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. `Learn more. <https://tidelift.com/subscription/pkg/pypi-pytz?utm_source=pypi-pytz&utm_medium=referral&utm_campaign=enterprise&utm_term=repo>`_.
  37. Example & Usage
  38. ~~~~~~~~~~~~~~~
  39. Localized times and date arithmetic
  40. -----------------------------------
  41. >>> from datetime import datetime, timedelta
  42. >>> from pytz import timezone
  43. >>> import pytz
  44. >>> utc = pytz.utc
  45. >>> utc.zone
  46. 'UTC'
  47. >>> eastern = timezone('US/Eastern')
  48. >>> eastern.zone
  49. 'US/Eastern'
  50. >>> amsterdam = timezone('Europe/Amsterdam')
  51. >>> fmt = '%Y-%m-%d %H:%M:%S %Z%z'
  52. This library only supports two ways of building a localized time. The
  53. first is to use the ``localize()`` method provided by the pytz library.
  54. This is used to localize a naive datetime (datetime with no timezone
  55. information):
  56. >>> loc_dt = eastern.localize(datetime(2002, 10, 27, 6, 0, 0))
  57. >>> print(loc_dt.strftime(fmt))
  58. 2002-10-27 06:00:00 EST-0500
  59. The second way of building a localized time is by converting an existing
  60. localized time using the standard ``astimezone()`` method:
  61. >>> ams_dt = loc_dt.astimezone(amsterdam)
  62. >>> ams_dt.strftime(fmt)
  63. '2002-10-27 12:00:00 CET+0100'
  64. Unfortunately using the tzinfo argument of the standard datetime
  65. constructors ''does not work'' with pytz for many timezones.
  66. >>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=amsterdam).strftime(fmt) # /!\ Does not work this way!
  67. '2002-10-27 12:00:00 LMT+0020'
  68. It is safe for timezones without daylight saving transitions though, such
  69. as UTC:
  70. >>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=pytz.utc).strftime(fmt) # /!\ Not recommended except for UTC
  71. '2002-10-27 12:00:00 UTC+0000'
  72. The preferred way of dealing with times is to always work in UTC,
  73. converting to localtime only when generating output to be read
  74. by humans.
  75. >>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)
  76. >>> loc_dt = utc_dt.astimezone(eastern)
  77. >>> loc_dt.strftime(fmt)
  78. '2002-10-27 01:00:00 EST-0500'
  79. This library also allows you to do date arithmetic using local
  80. times, although it is more complicated than working in UTC as you
  81. need to use the ``normalize()`` method to handle daylight saving time
  82. and other timezone transitions. In this example, ``loc_dt`` is set
  83. to the instant when daylight saving time ends in the US/Eastern
  84. timezone.
  85. >>> before = loc_dt - timedelta(minutes=10)
  86. >>> before.strftime(fmt)
  87. '2002-10-27 00:50:00 EST-0500'
  88. >>> eastern.normalize(before).strftime(fmt)
  89. '2002-10-27 01:50:00 EDT-0400'
  90. >>> after = eastern.normalize(before + timedelta(minutes=20))
  91. >>> after.strftime(fmt)
  92. '2002-10-27 01:10:00 EST-0500'
  93. Creating local times is also tricky, and the reason why working with
  94. local times is not recommended. Unfortunately, you cannot just pass
  95. a ``tzinfo`` argument when constructing a datetime (see the next
  96. section for more details)
  97. >>> dt = datetime(2002, 10, 27, 1, 30, 0)
  98. >>> dt1 = eastern.localize(dt, is_dst=True)
  99. >>> dt1.strftime(fmt)
  100. '2002-10-27 01:30:00 EDT-0400'
  101. >>> dt2 = eastern.localize(dt, is_dst=False)
  102. >>> dt2.strftime(fmt)
  103. '2002-10-27 01:30:00 EST-0500'
  104. Converting between timezones is more easily done, using the
  105. standard astimezone method.
  106. >>> utc_dt = utc.localize(datetime.utcfromtimestamp(1143408899))
  107. >>> utc_dt.strftime(fmt)
  108. '2006-03-26 21:34:59 UTC+0000'
  109. >>> au_tz = timezone('Australia/Sydney')
  110. >>> au_dt = utc_dt.astimezone(au_tz)
  111. >>> au_dt.strftime(fmt)
  112. '2006-03-27 08:34:59 AEDT+1100'
  113. >>> utc_dt2 = au_dt.astimezone(utc)
  114. >>> utc_dt2.strftime(fmt)
  115. '2006-03-26 21:34:59 UTC+0000'
  116. >>> utc_dt == utc_dt2
  117. True
  118. You can take shortcuts when dealing with the UTC side of timezone
  119. conversions. ``normalize()`` and ``localize()`` are not really
  120. necessary when there are no daylight saving time transitions to
  121. deal with.
  122. >>> utc_dt = datetime.utcfromtimestamp(1143408899).replace(tzinfo=utc)
  123. >>> utc_dt.strftime(fmt)
  124. '2006-03-26 21:34:59 UTC+0000'
  125. >>> au_tz = timezone('Australia/Sydney')
  126. >>> au_dt = au_tz.normalize(utc_dt.astimezone(au_tz))
  127. >>> au_dt.strftime(fmt)
  128. '2006-03-27 08:34:59 AEDT+1100'
  129. >>> utc_dt2 = au_dt.astimezone(utc)
  130. >>> utc_dt2.strftime(fmt)
  131. '2006-03-26 21:34:59 UTC+0000'
  132. ``tzinfo`` API
  133. --------------
  134. The ``tzinfo`` instances returned by the ``timezone()`` function have
  135. been extended to cope with ambiguous times by adding an ``is_dst``
  136. parameter to the ``utcoffset()``, ``dst()`` && ``tzname()`` methods.
  137. >>> tz = timezone('America/St_Johns')
  138. >>> normal = datetime(2009, 9, 1)
  139. >>> ambiguous = datetime(2009, 10, 31, 23, 30)
  140. The ``is_dst`` parameter is ignored for most timestamps. It is only used
  141. during DST transition ambiguous periods to resolve that ambiguity.
  142. >>> print(tz.utcoffset(normal, is_dst=True))
  143. -1 day, 21:30:00
  144. >>> print(tz.dst(normal, is_dst=True))
  145. 1:00:00
  146. >>> tz.tzname(normal, is_dst=True)
  147. 'NDT'
  148. >>> print(tz.utcoffset(ambiguous, is_dst=True))
  149. -1 day, 21:30:00
  150. >>> print(tz.dst(ambiguous, is_dst=True))
  151. 1:00:00
  152. >>> tz.tzname(ambiguous, is_dst=True)
  153. 'NDT'
  154. >>> print(tz.utcoffset(normal, is_dst=False))
  155. -1 day, 21:30:00
  156. >>> tz.dst(normal, is_dst=False)
  157. datetime.timedelta(0, 3600)
  158. >>> tz.tzname(normal, is_dst=False)
  159. 'NDT'
  160. >>> print(tz.utcoffset(ambiguous, is_dst=False))
  161. -1 day, 20:30:00
  162. >>> tz.dst(ambiguous, is_dst=False)
  163. datetime.timedelta(0)
  164. >>> tz.tzname(ambiguous, is_dst=False)
  165. 'NST'
  166. If ``is_dst`` is not specified, ambiguous timestamps will raise
  167. an ``pytz.exceptions.AmbiguousTimeError`` exception.
  168. >>> print(tz.utcoffset(normal))
  169. -1 day, 21:30:00
  170. >>> print(tz.dst(normal))
  171. 1:00:00
  172. >>> tz.tzname(normal)
  173. 'NDT'
  174. >>> import pytz.exceptions
  175. >>> try:
  176. ... tz.utcoffset(ambiguous)
  177. ... except pytz.exceptions.AmbiguousTimeError:
  178. ... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)
  179. pytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00
  180. >>> try:
  181. ... tz.dst(ambiguous)
  182. ... except pytz.exceptions.AmbiguousTimeError:
  183. ... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)
  184. pytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00
  185. >>> try:
  186. ... tz.tzname(ambiguous)
  187. ... except pytz.exceptions.AmbiguousTimeError:
  188. ... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)
  189. pytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00
  190. Problems with Localtime
  191. ~~~~~~~~~~~~~~~~~~~~~~~
  192. The major problem we have to deal with is that certain datetimes
  193. may occur twice in a year. For example, in the US/Eastern timezone
  194. on the last Sunday morning in October, the following sequence
  195. happens:
  196. - 01:00 EDT occurs
  197. - 1 hour later, instead of 2:00am the clock is turned back 1 hour
  198. and 01:00 happens again (this time 01:00 EST)
  199. In fact, every instant between 01:00 and 02:00 occurs twice. This means
  200. that if you try and create a time in the 'US/Eastern' timezone
  201. the standard datetime syntax, there is no way to specify if you meant
  202. before of after the end-of-daylight-saving-time transition. Using the
  203. pytz custom syntax, the best you can do is make an educated guess:
  204. >>> loc_dt = eastern.localize(datetime(2002, 10, 27, 1, 30, 00))
  205. >>> loc_dt.strftime(fmt)
  206. '2002-10-27 01:30:00 EST-0500'
  207. As you can see, the system has chosen one for you and there is a 50%
  208. chance of it being out by one hour. For some applications, this does
  209. not matter. However, if you are trying to schedule meetings with people
  210. in different timezones or analyze log files it is not acceptable.
  211. The best and simplest solution is to stick with using UTC. The pytz
  212. package encourages using UTC for internal timezone representation by
  213. including a special UTC implementation based on the standard Python
  214. reference implementation in the Python documentation.
  215. The UTC timezone unpickles to be the same instance, and pickles to a
  216. smaller size than other pytz tzinfo instances. The UTC implementation
  217. can be obtained as pytz.utc, pytz.UTC, or pytz.timezone('UTC').
  218. >>> import pickle, pytz
  219. >>> dt = datetime(2005, 3, 1, 14, 13, 21, tzinfo=utc)
  220. >>> naive = dt.replace(tzinfo=None)
  221. >>> p = pickle.dumps(dt, 1)
  222. >>> naive_p = pickle.dumps(naive, 1)
  223. >>> len(p) - len(naive_p)
  224. 17
  225. >>> new = pickle.loads(p)
  226. >>> new == dt
  227. True
  228. >>> new is dt
  229. False
  230. >>> new.tzinfo is dt.tzinfo
  231. True
  232. >>> pytz.utc is pytz.UTC is pytz.timezone('UTC')
  233. True
  234. Note that some other timezones are commonly thought of as the same (GMT,
  235. Greenwich, Universal, etc.). The definition of UTC is distinct from these
  236. other timezones, and they are not equivalent. For this reason, they will
  237. not compare the same in Python.
  238. >>> utc == pytz.timezone('GMT')
  239. False
  240. See the section `What is UTC`_, below.
  241. If you insist on working with local times, this library provides a
  242. facility for constructing them unambiguously:
  243. >>> loc_dt = datetime(2002, 10, 27, 1, 30, 00)
  244. >>> est_dt = eastern.localize(loc_dt, is_dst=True)
  245. >>> edt_dt = eastern.localize(loc_dt, is_dst=False)
  246. >>> print(est_dt.strftime(fmt) + ' / ' + edt_dt.strftime(fmt))
  247. 2002-10-27 01:30:00 EDT-0400 / 2002-10-27 01:30:00 EST-0500
  248. If you pass None as the is_dst flag to localize(), pytz will refuse to
  249. guess and raise exceptions if you try to build ambiguous or non-existent
  250. times.
  251. For example, 1:30am on 27th Oct 2002 happened twice in the US/Eastern
  252. timezone when the clocks where put back at the end of Daylight Saving
  253. Time:
  254. >>> dt = datetime(2002, 10, 27, 1, 30, 00)
  255. >>> try:
  256. ... eastern.localize(dt, is_dst=None)
  257. ... except pytz.exceptions.AmbiguousTimeError:
  258. ... print('pytz.exceptions.AmbiguousTimeError: %s' % dt)
  259. pytz.exceptions.AmbiguousTimeError: 2002-10-27 01:30:00
  260. Similarly, 2:30am on 7th April 2002 never happened at all in the
  261. US/Eastern timezone, as the clocks where put forward at 2:00am skipping
  262. the entire hour:
  263. >>> dt = datetime(2002, 4, 7, 2, 30, 00)
  264. >>> try:
  265. ... eastern.localize(dt, is_dst=None)
  266. ... except pytz.exceptions.NonExistentTimeError:
  267. ... print('pytz.exceptions.NonExistentTimeError: %s' % dt)
  268. pytz.exceptions.NonExistentTimeError: 2002-04-07 02:30:00
  269. Both of these exceptions share a common base class to make error handling
  270. easier:
  271. >>> isinstance(pytz.AmbiguousTimeError(), pytz.InvalidTimeError)
  272. True
  273. >>> isinstance(pytz.NonExistentTimeError(), pytz.InvalidTimeError)
  274. True
  275. A special case is where countries change their timezone definitions
  276. with no daylight savings time switch. For example, in 1915 Warsaw
  277. switched from Warsaw time to Central European time with no daylight savings
  278. transition. So at the stroke of midnight on August 5th 1915 the clocks
  279. were wound back 24 minutes creating an ambiguous time period that cannot
  280. be specified without referring to the timezone abbreviation or the
  281. actual UTC offset. In this case midnight happened twice, neither time
  282. during a daylight saving time period. pytz handles this transition by
  283. treating the ambiguous period before the switch as daylight savings
  284. time, and the ambiguous period after as standard time.
  285. >>> warsaw = pytz.timezone('Europe/Warsaw')
  286. >>> amb_dt1 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=True)
  287. >>> amb_dt1.strftime(fmt)
  288. '1915-08-04 23:59:59 WMT+0124'
  289. >>> amb_dt2 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=False)
  290. >>> amb_dt2.strftime(fmt)
  291. '1915-08-04 23:59:59 CET+0100'
  292. >>> switch_dt = warsaw.localize(datetime(1915, 8, 5, 00, 00, 00), is_dst=False)
  293. >>> switch_dt.strftime(fmt)
  294. '1915-08-05 00:00:00 CET+0100'
  295. >>> str(switch_dt - amb_dt1)
  296. '0:24:01'
  297. >>> str(switch_dt - amb_dt2)
  298. '0:00:01'
  299. The best way of creating a time during an ambiguous time period is
  300. by converting from another timezone such as UTC:
  301. >>> utc_dt = datetime(1915, 8, 4, 22, 36, tzinfo=pytz.utc)
  302. >>> utc_dt.astimezone(warsaw).strftime(fmt)
  303. '1915-08-04 23:36:00 CET+0100'
  304. The standard Python way of handling all these ambiguities is not to
  305. handle them, such as demonstrated in this example using the US/Eastern
  306. timezone definition from the Python documentation (Note that this
  307. implementation only works for dates between 1987 and 2006 - it is
  308. included for tests only!):
  309. >>> from pytz.reference import Eastern # pytz.reference only for tests
  310. >>> dt = datetime(2002, 10, 27, 0, 30, tzinfo=Eastern)
  311. >>> str(dt)
  312. '2002-10-27 00:30:00-04:00'
  313. >>> str(dt + timedelta(hours=1))
  314. '2002-10-27 01:30:00-05:00'
  315. >>> str(dt + timedelta(hours=2))
  316. '2002-10-27 02:30:00-05:00'
  317. >>> str(dt + timedelta(hours=3))
  318. '2002-10-27 03:30:00-05:00'
  319. Notice the first two results? At first glance you might think they are
  320. correct, but taking the UTC offset into account you find that they are
  321. actually two hours appart instead of the 1 hour we asked for.
  322. >>> from pytz.reference import UTC # pytz.reference only for tests
  323. >>> str(dt.astimezone(UTC))
  324. '2002-10-27 04:30:00+00:00'
  325. >>> str((dt + timedelta(hours=1)).astimezone(UTC))
  326. '2002-10-27 06:30:00+00:00'
  327. Country Information
  328. ~~~~~~~~~~~~~~~~~~~
  329. A mechanism is provided to access the timezones commonly in use
  330. for a particular country, looked up using the ISO 3166 country code.
  331. It returns a list of strings that can be used to retrieve the relevant
  332. tzinfo instance using ``pytz.timezone()``:
  333. >>> print(' '.join(pytz.country_timezones['nz']))
  334. Pacific/Auckland Pacific/Chatham
  335. The Olson database comes with a ISO 3166 country code to English country
  336. name mapping that pytz exposes as a dictionary:
  337. >>> print(pytz.country_names['nz'])
  338. New Zealand
  339. What is UTC
  340. ~~~~~~~~~~~
  341. 'UTC' is `Coordinated Universal Time`_. It is a successor to, but distinct
  342. from, Greenwich Mean Time (GMT) and the various definitions of Universal
  343. Time. UTC is now the worldwide standard for regulating clocks and time
  344. measurement.
  345. All other timezones are defined relative to UTC, and include offsets like
  346. UTC+0800 - hours to add or subtract from UTC to derive the local time. No
  347. daylight saving time occurs in UTC, making it a useful timezone to perform
  348. date arithmetic without worrying about the confusion and ambiguities caused
  349. by daylight saving time transitions, your country changing its timezone, or
  350. mobile computers that roam through multiple timezones.
  351. .. _Coordinated Universal Time: https://en.wikipedia.org/wiki/Coordinated_Universal_Time
  352. Helpers
  353. ~~~~~~~
  354. There are two lists of timezones provided.
  355. ``all_timezones`` is the exhaustive list of the timezone names that can
  356. be used.
  357. >>> from pytz import all_timezones
  358. >>> len(all_timezones) >= 500
  359. True
  360. >>> 'Etc/Greenwich' in all_timezones
  361. True
  362. ``common_timezones`` is a list of useful, current timezones. It doesn't
  363. contain deprecated zones or historical zones, except for a few I've
  364. deemed in common usage, such as US/Eastern (open a bug report if you
  365. think other timezones are deserving of being included here). It is also
  366. a sequence of strings.
  367. >>> from pytz import common_timezones
  368. >>> len(common_timezones) < len(all_timezones)
  369. True
  370. >>> 'Etc/Greenwich' in common_timezones
  371. False
  372. >>> 'Australia/Melbourne' in common_timezones
  373. True
  374. >>> 'US/Eastern' in common_timezones
  375. True
  376. >>> 'Canada/Eastern' in common_timezones
  377. True
  378. >>> 'Australia/Yancowinna' in all_timezones
  379. True
  380. >>> 'Australia/Yancowinna' in common_timezones
  381. False
  382. Both ``common_timezones`` and ``all_timezones`` are alphabetically
  383. sorted:
  384. >>> common_timezones_dupe = common_timezones[:]
  385. >>> common_timezones_dupe.sort()
  386. >>> common_timezones == common_timezones_dupe
  387. True
  388. >>> all_timezones_dupe = all_timezones[:]
  389. >>> all_timezones_dupe.sort()
  390. >>> all_timezones == all_timezones_dupe
  391. True
  392. ``all_timezones`` and ``common_timezones`` are also available as sets.
  393. >>> from pytz import all_timezones_set, common_timezones_set
  394. >>> 'US/Eastern' in all_timezones_set
  395. True
  396. >>> 'US/Eastern' in common_timezones_set
  397. True
  398. >>> 'Australia/Victoria' in common_timezones_set
  399. False
  400. You can also retrieve lists of timezones used by particular countries
  401. using the ``country_timezones()`` function. It requires an ISO-3166
  402. two letter country code.
  403. >>> from pytz import country_timezones
  404. >>> print(' '.join(country_timezones('ch')))
  405. Europe/Zurich
  406. >>> print(' '.join(country_timezones('CH')))
  407. Europe/Zurich
  408. Internationalization - i18n/l10n
  409. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  410. Pytz is an interface to the IANA database, which uses ASCII names. The `Unicode Consortium's Unicode Locales (CLDR) <http://cldr.unicode.org>`_
  411. project provides translations. Thomas Khyn's
  412. `l18n <https://pypi.org/project/l18n/>`_ package can be used to access
  413. these translations from Python.
  414. License
  415. ~~~~~~~
  416. MIT license.
  417. This code is also available as part of Zope 3 under the Zope Public
  418. License, Version 2.1 (ZPL).
  419. I'm happy to relicense this code if necessary for inclusion in other
  420. open source projects.
  421. Latest Versions
  422. ~~~~~~~~~~~~~~~
  423. This package will be updated after releases of the Olson timezone
  424. database. The latest version can be downloaded from the `Python Package
  425. Index <https://pypi.org/project/pytz/>`_. The code that is used
  426. to generate this distribution is hosted on launchpad.net and available
  427. using git::
  428. git clone https://git.launchpad.net/pytz
  429. A mirror on github is also available at https://github.com/stub42/pytz
  430. Announcements of new releases are made on
  431. `Launchpad <https://launchpad.net/pytz>`_, and the
  432. `Atom feed <http://feeds.launchpad.net/pytz/announcements.atom>`_
  433. hosted there.
  434. Bugs, Feature Requests & Patches
  435. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  436. Bugs can be reported using `Launchpad Bugs <https://bugs.launchpad.net/pytz>`_.
  437. Security Issues
  438. ~~~~~~~~~~~~~~~
  439. Reports about security issues can be made via `Tidelift <https://tidelift.com/security>`_.
  440. Issues & Limitations
  441. ~~~~~~~~~~~~~~~~~~~~
  442. - Offsets from UTC are rounded to the nearest whole minute, so timezones
  443. such as Europe/Amsterdam pre 1937 will be up to 30 seconds out. This
  444. is a limitation of the Python datetime library.
  445. - If you think a timezone definition is incorrect, I probably can't fix
  446. it. pytz is a direct translation of the Olson timezone database, and
  447. changes to the timezone definitions need to be made to this source.
  448. If you find errors they should be reported to the time zone mailing
  449. list, linked from http://www.iana.org/time-zones.
  450. Further Reading
  451. ~~~~~~~~~~~~~~~
  452. More info than you want to know about timezones:
  453. http://www.twinsun.com/tz/tz-link.htm
  454. Contact
  455. ~~~~~~~
  456. Stuart Bishop <stuart@stuartbishop.net>