Description: Use system zone information from the tzdata package Author: Kurt Roeckx Author: Hilko Bengen Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=416202 Forwarded: not-needed Last-Update: 2018-02-14 Index: pytz-2018.3/pytz/tzfile.py =================================================================== --- pytz-2018.3.orig/pytz/tzfile.py +++ pytz-2018.3/pytz/tzfile.py @@ -126,7 +126,8 @@ def build_tzinfo(zone, fp): if __name__ == '__main__': import os.path from pprint import pprint - base = os.path.join(os.path.dirname(__file__), 'zoneinfo') + # Patched in Debian, use the system zoninfo from the tzdata package + base = '/usr/share/zoneinfo' tz = build_tzinfo('Australia/Melbourne', open(os.path.join(base, 'Australia', 'Melbourne'), 'rb')) tz = build_tzinfo('US/Eastern', Index: pytz-2018.3/pytz/__init__.py =================================================================== --- pytz-2018.3.orig/pytz/__init__.py +++ pytz-2018.3/pytz/__init__.py @@ -94,7 +94,7 @@ def open_resource(name): if zoneinfo_dir is not None: filename = os.path.join(zoneinfo_dir, *name_parts) else: - filename = os.path.join(os.path.dirname(__file__), + filename = os.path.join('/usr','share', 'zoneinfo', *name_parts) if not os.path.exists(filename): # http://bugs.launchpad.net/bugs/383171 - we avoid using this