Description of problem: The version of python-tzlocal in EPEL 7 does not work with systemd, rendering it useless on RHEL 7 or CentOS 7. This has been fixed in upstream, with version 1.2: 1.2 (2015-06-14) ---------------- - Systemd stores no time zone name, forcing us to look at the name of the file that localtime symlinks to. (cameris) So please update python-tzlocal in EPEL to this version. Version-Release number of selected component (if applicable): 1.1.2-4 How reproducible: Use python-tzlocal on RHEL 7 Steps to Reproduce: Python 2.7.5 (default, Nov 20 2015, 02:00:19) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from tzlocal import get_localzone >>> tz = get_localzone() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/site-packages/tzlocal/unix.py", line 108, in get_localzone _cache_tz = _get_localzone() File "/usr/lib/python2.7/site-packages/tzlocal/unix.py", line 100, in _get_localzone return pytz.tzfile.build_tzinfo('local', tzfile) File "/usr/lib/python2.7/site-packages/pytz/tzfile.py", line 30, in build_tzinfo typecnt, charcnt) = unpack(head_fmt, fp.read(head_size)) struct.error: unpack requires a string argument of length 44 Actual results: python throws a stack trace. Expected results: As on RHEL 6: Python 2.6.6 (r266:84292, Jul 22 2015, 16:47:47) [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from tzlocal import get_localzone >>> tz = get_localzone() >>> print tz Europe/Berlin >>> Additional info: This has been fixed in upstream version 1.2: 1.2 (2015-06-14) ---------------- - Systemd stores no time zone name, forcing us to look at the name of the file that localtime symlinks to. (cameris)
Thank you for reporting
python-tzlocal-1.2-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-8434cdd00f
python-tzlocal-1.2-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8b4c6e8833
python-tzlocal-1.2-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-8434cdd00f
python-tzlocal-1.2-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8b4c6e8833
python-tzlocal-1.2-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
python-tzlocal-1.2-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.