Skip to main content

Official timezone database for Python.

Project description

Pytzdata Build status

Official timezone database for Python.

Supports Python 2.7+ and 3.5+.


pip install pytzdata


You can access the content of a specific timezone file by using the tz_file() function:

from pytzdata import tz_file

with tz_file('Europe/Paris') as f:
    # Do something with the file

If you just want to know the path to a specific timezone file, you may use the tz_path() function:

from pytzdata import tz_path


By default, pytzdata will use the bundled timezone database, however you can set a custom directory that holds the timezone files using the set_directory function:

import pytzdata


You can also set the PYTZDATA_TZDATADIR environment variable to set a custom directory.


To make a new release just follow these steps:

  • make data
  • Update version numbers in pytzdata/ and tests/
  • make tox


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pytzdata, version 2018.3
Filename, size File type Python version Upload date Hashes
Filename, size pytzdata-2018.3-py2.py3-none-any.whl (492.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size pytzdata-2018.3.tar.gz (280.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page