--- id: pytz version: "2026.3.post1" license: MIT license_treatment: permissive maintenance: active --- # pytz — World timezone definitions, modern and historical License: permissive · Maintenance: active · Popularity: top 100 on PyPI ## Install pip install pytz uv add pytz poetry add pytz ## Description pytz - World Timezone Definitions for Python ============================================ :Author: Stuart Bishop Introduction ~~~~~~~~~~~~ pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher. It also solves the issue of ambiguous times at the end of daylight saving time, which you can read more about in the Python Library Reference (``datetime.tzinfo``). Almost all of the Olson timezones are supported. .. note:: Projects using Python 3.9 or later should use the standard library `zoneinfo `_ module with time zone database updates from `tzdata `_ package. pytz offers no advantages beyond backwards compatibility with code written for earlier versions of Python. .. note:: This library differs from the documented Python API for tzinfo implementations; if you want to create local wallclock times you need to use the ``localize()`` method documented in this document. In addition, if you perform date arithmetic on local times that cross DST... ## AI interpretation — verify before relying pytz brings the Olson timezone database into Python, enabling accurate cross-platform timezone calculations and handling of daylight saving time transitions using the datetime module. Verdict: pytz is a mature, actively maintained timezone library with no known vulnerabilities and permissive licensing. However, the package documentation explicitly recommends Python 3.9+ users adopt the standard library zoneinfo module instead, reserving pytz mainly for legacy codebases. For older Python versions or existing pytz-dependent projects, it remains a reliable choice. [View on SkillFed](https://skillfed.io/packages/pytz) · [View on PyPI](https://pypi.org/project/pytz/)