The Olson timezone database for Python.
Project Links
Meta
Author: Sébastien Eustace
Requires Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Classifiers
License
- OSI Approved :: MIT License
Operating System
- OS Independent
Programming Language
- Python :: 2
- Python :: 2.7
- Python :: 3
- Python :: 3.4
- Python :: 3.5
- Python :: 3.6
- Python :: 3.7
- Python :: 3.8
Topic
- Software Development :: Libraries :: Python Modules

The Olson timezone database for Python.
Supports Python 2.7+ and 3.5+.
Installation
pip install pytzdata
Usage
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
tz_path('Europe/Paris')
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
pytzdata.set_directory('/custom/zoneinfo')
You can also set the PYTZDATA_TZDATADIR environment variable to set a custom directory.
Release
To make a new release just follow these steps:
make data
Update version numbers in pytzdata/version.py and tests/test_version.py
make tox
Resources
Jul 13, 2020
2020.1
Sep 20, 2019
2019.3
Jul 03, 2019
2019.2
Apr 10, 2019
2019.1
Feb 05, 2019
2018.9
Feb 05, 2019
2018.8
Oct 27, 2018
2018.7
Oct 27, 2018
2018.6
May 11, 2018
2018.5
Apr 11, 2018
2018.4
Jan 29, 2018
2018.3
Nov 03, 2017
2017.3.1
Oct 23, 2017
2017.3
Sep 06, 2017
2017.2.2
Aug 28, 2017
2017.2.1
Mar 23, 2017
2017.2
Mar 01, 2017
2017.1
Nov 24, 2016
2016.10
Nov 03, 2016
2016.9.1
Nov 03, 2016
2016.9
Oct 20, 2016
2016.8
Sep 29, 2016
2016.7
Wheel compatibility matrix
Files in release
No dependencies