Hello community, here is the log from the commit of package python-tzlocal for openSUSE:Factory checked in at 2017-10-09 19:41:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-tzlocal (Old) and /work/SRC/openSUSE:Factory/.python-tzlocal.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-tzlocal" Mon Oct 9 19:41:11 2017 rev:4 rq:530456 version:1.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-tzlocal/python-tzlocal.changes 2017-07-21 22:48:34.955640287 +0200 +++ /work/SRC/openSUSE:Factory/.python-tzlocal.new/python-tzlocal.changes 2017-10-09 19:41:12.294086319 +0200 @@ -1,0 +2,19 @@ +Mon Oct 2 12:15:10 UTC 2017 - sean.mar...@suse.com + +- Update source tarball location. + +------------------------------------------------------------------- +Mon Aug 28 17:37:27 UTC 2017 - bear...@opensuse.org + +- Update to version 1.4 + - Relicensed upstream as MIT + - Dropping support for Python versions 2.5, 3.1, 3.2 + - adding support for Python 3.6 + - Closes stdout and stderr to get rid of ResourceWarnings + - Added support for /var/db/zoneinfo + - Tests failed if TZ was set in the environment. + - Replaces os.popen() with subprocess.Popen() + - Systemd stores no time zone name, forcing us to look at the + name of the file that localtime symlinks to. + +------------------------------------------------------------------- Old: ---- tzlocal-1.1.3.tar.gz New: ---- tzlocal-1.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-tzlocal.spec ++++++ --- /var/tmp/diff_new_pack.5yIstt/_old 2017-10-09 19:41:12.902059597 +0200 +++ /var/tmp/diff_new_pack.5yIstt/_new 2017-10-09 19:41:12.906059421 +0200 @@ -19,13 +19,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define modname tzlocal Name: python-%{modname} -Version: 1.1.3 +Version: 1.4 Release: 0 Summary: Provides tzinfo object for the local timezone -License: CC0-1.0 +License: MIT Group: Development/Libraries/Python Url: https://github.com/regebro/%{modname} -Source: http://pypi.python.org/packages/source/t/%{modname}/%{modname}-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/source/t/%{modname}/%{modname}-%{version}.tar.gz BuildRequires: %{python_module devel} BuildRequires: %{python_module pytz} BuildRequires: %{python_module setuptools} ++++++ tzlocal-1.1.3.tar.gz -> tzlocal-1.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tzlocal-1.1.3/CHANGES.txt new/tzlocal-1.4/CHANGES.txt --- old/tzlocal-1.1.3/CHANGES.txt 2015-04-08 15:32:10.000000000 +0200 +++ new/tzlocal-1.4/CHANGES.txt 2017-04-18 18:51:44.000000000 +0200 @@ -1,9 +1,57 @@ Changes ======= -1.1.3 (2015-04-08) +1.4 (2017-04-18) +---------------- + +- I use MIT on my other projects, so relicensing. + + +1.4b1 (2017-04-14) +------------------ + +- Dropping support for Python versions nobody uses (2.5, 3.1, 3.2), adding 3.6 + Python 3.1 and 3.2 still works, 2.5 has been broken for some time. + +- Ayalash's OS X fix didn't work on Python 2.7, fixed that. + + +1.3.2 (2017-04-12) +------------------ + +- Ensure closing of subprocess on OS X (ayalash) + +- Removed unused imports (jwilk) + +- Closes stdout and stderr to get rid of ResourceWarnings (johnwquarles) + +- Updated Windows timezones (axil) + + +1.3 (2016-10-15) +---------------- + +- #34: Added support for /var/db/zoneinfo + + +1.2.2 (2016-03-02) ------------------ +- #30: Fixed a bug on OS X. + + +1.2.1 (2016-02-28) +------------------ + +- Tests failed if TZ was set in the environment. (EdwardBetts) + +- Replaces os.popen() with subprocess.Popen() for OS X to + handle when systemsetup doesn't exist. (mckabi, cewing) + + +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) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tzlocal-1.1.3/LICENSE.txt new/tzlocal-1.4/LICENSE.txt --- old/tzlocal-1.1.3/LICENSE.txt 2015-04-08 15:32:10.000000000 +0200 +++ new/tzlocal-1.4/LICENSE.txt 2017-04-18 18:51:44.000000000 +0200 @@ -1,121 +1,19 @@ -Creative Commons Legal Code +Copyright 2011-2017 Lennart Regebro -CC0 1.0 Universal - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS - PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM - THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED - HEREUNDER. - -Statement of Purpose - -The laws of most jurisdictions throughout the world automatically confer -exclusive Copyright and Related Rights (defined below) upon the creator -and subsequent owner(s) (each and all, an "owner") of an original work of -authorship and/or a database (each, a "Work"). - -Certain owners wish to permanently relinquish those rights to a Work for -the purpose of contributing to a commons of creative, cultural and -scientific works ("Commons") that the public can reliably and without fear -of later claims of infringement build upon, modify, incorporate in other -works, reuse and redistribute as freely as possible in any form whatsoever -and for any purposes, including without limitation commercial purposes. -These owners may contribute to the Commons to promote the ideal of a free -culture and the further production of creative, cultural and scientific -works, or to gain reputation or greater distribution for their Work in -part through the use and efforts of others. - -For these and/or other purposes and motivations, and without any -expectation of additional consideration or compensation, the person -associating CC0 with a Work (the "Affirmer"), to the extent that he or she -is an owner of Copyright and Related Rights in the Work, voluntarily -elects to apply CC0 to the Work and publicly distribute the Work under its -terms, with knowledge of his or her Copyright and Related Rights in the -Work and the meaning and intended legal effect of CC0 on those rights. - -1. Copyright and Related Rights. A Work made available under CC0 may be -protected by copyright and related or neighboring rights ("Copyright and -Related Rights"). Copyright and Related Rights include, but are not -limited to, the following: - - i. the right to reproduce, adapt, distribute, perform, display, - communicate, and translate a Work; - ii. moral rights retained by the original author(s) and/or performer(s); -iii. publicity and privacy rights pertaining to a person's image or - likeness depicted in a Work; - iv. rights protecting against unfair competition in regards to a Work, - subject to the limitations in paragraph 4(a), below; - v. rights protecting the extraction, dissemination, use and reuse of data - in a Work; - vi. database rights (such as those arising under Directive 96/9/EC of the - European Parliament and of the Council of 11 March 1996 on the legal - protection of databases, and under any national implementation - thereof, including any amended or successor version of such - directive); and -vii. other similar, equivalent or corresponding rights throughout the - world based on applicable law or treaty, and any national - implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention -of, applicable law, Affirmer hereby overtly, fully, permanently, -irrevocably and unconditionally waives, abandons, and surrenders all of -Affirmer's Copyright and Related Rights and associated claims and causes -of action, whether now known or unknown (including existing as well as -future claims and causes of action), in the Work (i) in all territories -worldwide, (ii) for the maximum duration provided by applicable law or -treaty (including future time extensions), (iii) in any current or future -medium and for any number of copies, and (iv) for any purpose whatsoever, -including without limitation commercial, advertising or promotional -purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each -member of the public at large and to the detriment of Affirmer's heirs and -successors, fully intending that such Waiver shall not be subject to -revocation, rescission, cancellation, termination, or any other legal or -equitable action to disrupt the quiet enjoyment of the Work by the public -as contemplated by Affirmer's express Statement of Purpose. - -3. Public License Fallback. Should any part of the Waiver for any reason -be judged legally invalid or ineffective under applicable law, then the -Waiver shall be preserved to the maximum extent permitted taking into -account Affirmer's express Statement of Purpose. In addition, to the -extent the Waiver is so judged Affirmer hereby grants to each affected -person a royalty-free, non transferable, non sublicensable, non exclusive, -irrevocable and unconditional license to exercise Affirmer's Copyright and -Related Rights in the Work (i) in all territories worldwide, (ii) for the -maximum duration provided by applicable law or treaty (including future -time extensions), (iii) in any current or future medium and for any number -of copies, and (iv) for any purpose whatsoever, including without -limitation commercial, advertising or promotional purposes (the -"License"). The License shall be deemed effective as of the date CC0 was -applied by Affirmer to the Work. Should any part of the License for any -reason be judged legally invalid or ineffective under applicable law, such -partial invalidity or ineffectiveness shall not invalidate the remainder -of the License, and in such case Affirmer hereby affirms that he or she -will not (i) exercise any of his or her remaining Copyright and Related -Rights in the Work or (ii) assert any associated claims and causes of -action with respect to the Work, in either case contrary to Affirmer's -express Statement of Purpose. - -4. Limitations and Disclaimers. - - a. No trademark or patent rights held by Affirmer are waived, abandoned, - surrendered, licensed or otherwise affected by this document. - b. Affirmer offers the Work as-is and makes no representations or - warranties of any kind concerning the Work, express, implied, - statutory or otherwise, including without limitation warranties of - title, merchantability, fitness for a particular purpose, non - infringement, or the absence of latent or other defects, accuracy, or - the present or absence of errors, whether or not discoverable, all to - the greatest extent permissible under applicable law. - c. Affirmer disclaims responsibility for clearing rights of other persons - that may apply to the Work or any use thereof, including without - limitation any person's Copyright and Related Rights in the Work. - Further, Affirmer disclaims responsibility for obtaining any necessary - consents, permissions or other rights required for any use of the - Work. - d. Affirmer understands and acknowledges that Creative Commons is not a - party to this document and has no duty or obligation with respect to - this CC0 or use of the Work. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tzlocal-1.1.3/PKG-INFO new/tzlocal-1.4/PKG-INFO --- old/tzlocal-1.1.3/PKG-INFO 2015-04-08 15:32:16.000000000 +0200 +++ new/tzlocal-1.4/PKG-INFO 2017-04-18 18:51:45.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: tzlocal -Version: 1.1.3 +Version: 1.4 Summary: tzinfo object for the local timezone Home-page: https://github.com/regebro/tzlocal Author: Lennart Regebro @@ -52,9 +52,9 @@ Create a local datetime: >>> from datetime import datetime - >>> dt = tz.localize(datetime.now()) + >>> dt = tz.localize(datetime(2015, 4, 10, 7, 22)) >>> dt - datetime.datetime(2012, 9, 11, 14, 43, 42, 518871, tzinfo=<DstTzInfo 'Europe/Warsaw' CEST+2:00:00 DST>) + datetime.datetime(2015, 4, 10, 7, 22, tzinfo=<DstTzInfo 'Europe/Warsaw' CEST+2:00:00 DST>) Lookup another timezone with `pytz`: @@ -63,8 +63,8 @@ Convert the datetime: - >>> eastern.normalize(dt.astimezone(eastern)) - datetime.datetime(2012, 9, 11, 8, 43, 42, 518871, tzinfo=<DstTzInfo 'US/Eastern' EDT-1 day, 20:00:00 DST>) + >>> dt.astimezone(eastern) + datetime.datetime(2015, 4, 10, 1, 22, tzinfo=<DstTzInfo 'US/Eastern' EDT-1 day, 20:00:00 DST>) Maintainer @@ -80,6 +80,13 @@ * Manuel Ebert * Xiaokun Zhu * Cameris + * Edward Betts + * McK KIM + * Cris Ewing + * Ayala Shachar + * Lev Maximov + * Jakub Wilk + * John Quarles (Sorry if I forgot someone) @@ -92,9 +99,57 @@ Changes ======= - 1.1.3 (2015-04-08) + 1.4 (2017-04-18) + ---------------- + + - I use MIT on my other projects, so relicensing. + + + 1.4b1 (2017-04-14) ------------------ + - Dropping support for Python versions nobody uses (2.5, 3.1, 3.2), adding 3.6 + Python 3.1 and 3.2 still works, 2.5 has been broken for some time. + + - Ayalash's OS X fix didn't work on Python 2.7, fixed that. + + + 1.3.2 (2017-04-12) + ------------------ + + - Ensure closing of subprocess on OS X (ayalash) + + - Removed unused imports (jwilk) + + - Closes stdout and stderr to get rid of ResourceWarnings (johnwquarles) + + - Updated Windows timezones (axil) + + + 1.3 (2016-10-15) + ---------------- + + - #34: Added support for /var/db/zoneinfo + + + 1.2.2 (2016-03-02) + ------------------ + + - #30: Fixed a bug on OS X. + + + 1.2.1 (2016-02-28) + ------------------ + + - Tests failed if TZ was set in the environment. (EdwardBetts) + + - Replaces os.popen() with subprocess.Popen() for OS X to + handle when systemsetup doesn't exist. (mckabi, cewing) + + + 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) @@ -165,15 +220,15 @@ Keywords: timezone pytz Platform: UNKNOWN -Classifier: Development Status :: 4 - Beta -Classifier: License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication +Classifier: Development Status :: 5 - Production/Stable +Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: Microsoft :: Windows Classifier: Operating System :: Unix Classifier: Operating System :: MacOS :: MacOS X -Classifier: Programming Language :: Python :: 2.5 Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3.1 -Classifier: Programming Language :: Python :: 3.2 +Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tzlocal-1.1.3/README.rst new/tzlocal-1.4/README.rst --- old/tzlocal-1.1.3/README.rst 2015-04-08 15:32:10.000000000 +0200 +++ new/tzlocal-1.4/README.rst 2017-04-18 18:51:44.000000000 +0200 @@ -44,9 +44,9 @@ Create a local datetime: >>> from datetime import datetime - >>> dt = tz.localize(datetime.now()) + >>> dt = tz.localize(datetime(2015, 4, 10, 7, 22)) >>> dt - datetime.datetime(2012, 9, 11, 14, 43, 42, 518871, tzinfo=<DstTzInfo 'Europe/Warsaw' CEST+2:00:00 DST>) + datetime.datetime(2015, 4, 10, 7, 22, tzinfo=<DstTzInfo 'Europe/Warsaw' CEST+2:00:00 DST>) Lookup another timezone with `pytz`: @@ -55,8 +55,8 @@ Convert the datetime: - >>> eastern.normalize(dt.astimezone(eastern)) - datetime.datetime(2012, 9, 11, 8, 43, 42, 518871, tzinfo=<DstTzInfo 'US/Eastern' EDT-1 day, 20:00:00 DST>) + >>> dt.astimezone(eastern) + datetime.datetime(2015, 4, 10, 1, 22, tzinfo=<DstTzInfo 'US/Eastern' EDT-1 day, 20:00:00 DST>) Maintainer @@ -72,6 +72,13 @@ * Manuel Ebert * Xiaokun Zhu * Cameris +* Edward Betts +* McK KIM +* Cris Ewing +* Ayala Shachar +* Lev Maximov +* Jakub Wilk +* John Quarles (Sorry if I forgot someone) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tzlocal-1.1.3/setup.py new/tzlocal-1.4/setup.py --- old/tzlocal-1.1.3/setup.py 2015-04-08 15:32:10.000000000 +0200 +++ new/tzlocal-1.4/setup.py 2017-04-18 18:51:44.000000000 +0200 @@ -1,25 +1,24 @@ from setuptools import setup, find_packages -import sys, os -version = '1.1.3' +version = '1.4' setup(name='tzlocal', version=version, description="tzinfo object for the local timezone", long_description=open('README.rst', 'rt').read() + '\n\n' + open('CHANGES.txt', 'rt').read(), classifiers=[ - 'Development Status :: 4 - Beta', - 'License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication', + 'Development Status :: 5 - Production/Stable', + 'License :: OSI Approved :: MIT License', 'Operating System :: Microsoft :: Windows', 'Operating System :: Unix', 'Operating System :: MacOS :: MacOS X', - 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.1', - 'Programming Language :: Python :: 3.2', + 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', ], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers keywords='timezone pytz', author='Lennart Regebro', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tzlocal-1.1.3/tzlocal/darwin.py new/tzlocal-1.4/tzlocal/darwin.py --- old/tzlocal-1.1.3/tzlocal/darwin.py 2015-04-08 15:32:10.000000000 +0200 +++ new/tzlocal-1.4/tzlocal/darwin.py 2017-04-18 18:51:44.000000000 +0200 @@ -1,17 +1,49 @@ from __future__ import with_statement import os import pytz +import subprocess +import sys _cache_tz = None -def _get_localzone(): - tzname = os.popen("systemsetup -gettimezone").read().replace("Time Zone: ", "").strip() +if sys.version_info[0] == 2: + + class Popen(subprocess.Popen): + + def __enter__(self): + return self + + def __exit__(self, type, value, traceback): + if self.stdout: + self.stdout.close() + if self.stderr: + self.stderr.close() + if self.stdin: + self.stdin.close() + # Wait for the process to terminate, to avoid zombies. + self.wait() + +else: + from subprocess import Popen + + +def _get_localzone(_root='/'): + with Popen( + "systemsetup -gettimezone", + shell=True, + stderr=subprocess.PIPE, + stdout=subprocess.PIPE + ) as pipe: + tzname = pipe.stdout.read().replace(b'Time Zone: ', b'').strip() + if not tzname or tzname not in pytz.all_timezones_set: # link will be something like /usr/share/zoneinfo/America/Los_Angeles. - link = os.readlink("/etc/localtime") + link = os.readlink(os.path.join(_root, "etc/localtime")) tzname = link[link.rfind("zoneinfo/") + 9:] + return pytz.timezone(tzname) + def get_localzone(): """Get the computers configured local timezone, if any.""" global _cache_tz @@ -19,9 +51,9 @@ _cache_tz = _get_localzone() return _cache_tz + def reload_localzone(): """Reload the cached localzone. You need to call this if the timezone has changed.""" global _cache_tz _cache_tz = _get_localzone() return _cache_tz - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tzlocal-1.1.3/tzlocal/test_data/vardbzoneinfo/var/db/zoneinfo new/tzlocal-1.4/tzlocal/test_data/vardbzoneinfo/var/db/zoneinfo --- old/tzlocal-1.1.3/tzlocal/test_data/vardbzoneinfo/var/db/zoneinfo 1970-01-01 01:00:00.000000000 +0100 +++ new/tzlocal-1.4/tzlocal/test_data/vardbzoneinfo/var/db/zoneinfo 2017-04-18 18:51:44.000000000 +0200 @@ -0,0 +1 @@ +Africa/Harare diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tzlocal-1.1.3/tzlocal/tests.py new/tzlocal-1.4/tzlocal/tests.py --- old/tzlocal-1.1.3/tzlocal/tests.py 2015-04-08 15:32:10.000000000 +0200 +++ new/tzlocal-1.4/tzlocal/tests.py 2017-04-18 18:51:44.000000000 +0200 @@ -4,8 +4,14 @@ import unittest import pytz import tzlocal.unix +import tzlocal.darwin class TzLocalTests(unittest.TestCase): + def setUp(self): + if 'TZ' in os.environ: + del os.environ['TZ'] + + self.path = os.path.split(__file__)[0] def test_env(self): tz_harare = tzlocal.unix._tz_from_env(':Africa/Harare') @@ -15,8 +21,7 @@ tz_harare = tzlocal.unix._tz_from_env('Africa/Harare') self.assertEqual(tz_harare.zone, 'Africa/Harare') - local_path = os.path.split(__file__)[0] - tz_local = tzlocal.unix._tz_from_env(':' + os.path.join(local_path, 'test_data', 'Harare')) + tz_local = tzlocal.unix._tz_from_env(':' + os.path.join(self.path, 'test_data', 'Harare')) self.assertEqual(tz_local.zone, 'local') # Make sure the local timezone is the same as the Harare one above. # We test this with a past date, so that we don't run into future changes @@ -29,35 +34,48 @@ def test_timezone(self): # Most versions of Ubuntu - local_path = os.path.split(__file__)[0] - tz = tzlocal.unix._get_localzone(_root=os.path.join(local_path, 'test_data', 'timezone')) + + tz = tzlocal.unix._get_localzone(_root=os.path.join(self.path, 'test_data', 'timezone')) self.assertEqual(tz.zone, 'Africa/Harare') def test_zone_setting(self): # A ZONE setting in /etc/sysconfig/clock, f ex CentOS - local_path = os.path.split(__file__)[0] - tz = tzlocal.unix._get_localzone(_root=os.path.join(local_path, 'test_data', 'zone_setting')) + + tz = tzlocal.unix._get_localzone(_root=os.path.join(self.path, 'test_data', 'zone_setting')) self.assertEqual(tz.zone, 'Africa/Harare') def test_timezone_setting(self): # A ZONE setting in /etc/conf.d/clock, f ex Gentoo - local_path = os.path.split(__file__)[0] - tz = tzlocal.unix._get_localzone(_root=os.path.join(local_path, 'test_data', 'timezone_setting')) + + tz = tzlocal.unix._get_localzone(_root=os.path.join(self.path, 'test_data', 'timezone_setting')) self.assertEqual(tz.zone, 'Africa/Harare') def test_symlink_localtime(self): # A ZONE setting in the target path of a symbolic linked localtime, f ex systemd distributions - local_path = os.path.split(__file__)[0] - tz = tzlocal.unix._get_localzone(_root=os.path.join(local_path, 'test_data', 'symlink_localtime')) + + tz = tzlocal.unix._get_localzone(_root=os.path.join(self.path, 'test_data', 'symlink_localtime')) + self.assertEqual(tz.zone, 'Africa/Harare') + + def test_vardbzoneinfo_setting(self): + # A ZONE setting in /etc/conf.d/clock, f ex Gentoo + + tz = tzlocal.unix._get_localzone(_root=os.path.join(self.path, 'test_data', 'vardbzoneinfo')) self.assertEqual(tz.zone, 'Africa/Harare') def test_only_localtime(self): - local_path = os.path.split(__file__)[0] - tz = tzlocal.unix._get_localzone(_root=os.path.join(local_path, 'test_data', 'localtime')) + + tz = tzlocal.unix._get_localzone(_root=os.path.join(self.path, 'test_data', 'localtime')) self.assertEqual(tz.zone, 'local') dt = datetime(2012, 1, 1, 5) self.assertEqual(pytz.timezone('Africa/Harare').localize(dt), tz.localize(dt)) + def test_darwin(self): + # Basic test of OS X code. The systemcall will fail if this is not OS X + # And a symlink will be used. This means that on OS X, this test will + # actually fail! No matter, this exersizes the code. + tz = tzlocal.darwin._get_localzone(_root=os.path.join(self.path, 'test_data', 'symlink_localtime')) + self.assertEqual(tz.zone, 'Africa/Harare') + if sys.platform == 'win32': import tzlocal.win32 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tzlocal-1.1.3/tzlocal/unix.py new/tzlocal-1.4/tzlocal/unix.py --- old/tzlocal-1.1.3/tzlocal/unix.py 2015-04-08 15:32:10.000000000 +0200 +++ new/tzlocal-1.4/tzlocal/unix.py 2017-04-18 18:51:44.000000000 +0200 @@ -44,21 +44,22 @@ # Now look for distribution specific configuration files # that contain the timezone name. - tzpath = os.path.join(_root, 'etc/timezone') - if os.path.exists(tzpath): - with open(tzpath, 'rb') as tzfile: - data = tzfile.read() - - # Issue #3 was that /etc/timezone was a zoneinfo file. - # That's a misconfiguration, but we need to handle it gracefully: - if data[:5] != 'TZif2': - etctz = data.strip().decode() - # Get rid of host definitions and comments: - if ' ' in etctz: - etctz, dummy = etctz.split(' ', 1) - if '#' in etctz: - etctz, dummy = etctz.split('#', 1) - return pytz.timezone(etctz.replace(' ', '_')) + for configfile in ('etc/timezone', 'var/db/zoneinfo'): + tzpath = os.path.join(_root, configfile) + if os.path.exists(tzpath): + with open(tzpath, 'rb') as tzfile: + data = tzfile.read() + + # Issue #3 was that /etc/timezone was a zoneinfo file. + # That's a misconfiguration, but we need to handle it gracefully: + if data[:5] != 'TZif2': + etctz = data.strip().decode() + # Get rid of host definitions and comments: + if ' ' in etctz: + etctz, dummy = etctz.split(' ', 1) + if '#' in etctz: + etctz, dummy = etctz.split('#', 1) + return pytz.timezone(etctz.replace(' ', '_')) # CentOS has a ZONE setting in /etc/sysconfig/clock, # OpenSUSE has a TIMEZONE setting in /etc/sysconfig/clock and @@ -90,7 +91,7 @@ # We found a timezone return pytz.timezone(etctz.replace(' ', '_')) - # systemd distributions use symlinks that include the zone name, + # systemd distributions use symlinks that include the zone name, # see manpage of localtime(5) and timedatectl(1) tzpath = os.path.join(_root, 'etc/localtime') if os.path.exists(tzpath) and os.path.islink(tzpath): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tzlocal-1.1.3/tzlocal/windows_tz.py new/tzlocal-1.4/tzlocal/windows_tz.py --- old/tzlocal-1.1.3/tzlocal/windows_tz.py 2015-04-08 15:32:10.000000000 +0200 +++ new/tzlocal-1.4/tzlocal/windows_tz.py 2017-04-18 18:51:44.000000000 +0200 @@ -4,16 +4,21 @@ 'AUS Eastern Standard Time': 'Australia/Sydney', 'Afghanistan Standard Time': 'Asia/Kabul', 'Alaskan Standard Time': 'America/Anchorage', + 'Aleutian Standard Time': 'America/Adak', + 'Altai Standard Time': 'Asia/Barnaul', 'Arab Standard Time': 'Asia/Riyadh', 'Arabian Standard Time': 'Asia/Dubai', 'Arabic Standard Time': 'Asia/Baghdad', 'Argentina Standard Time': 'America/Buenos_Aires', + 'Astrakhan Standard Time': 'Europe/Astrakhan', 'Atlantic Standard Time': 'America/Halifax', + 'Aus Central W. Standard Time': 'Australia/Eucla', 'Azerbaijan Standard Time': 'Asia/Baku', 'Azores Standard Time': 'Atlantic/Azores', 'Bahia Standard Time': 'America/Bahia', 'Bangladesh Standard Time': 'Asia/Dhaka', 'Belarus Standard Time': 'Europe/Minsk', + 'Bougainville Standard Time': 'Pacific/Bougainville', 'Canada Central Standard Time': 'America/Regina', 'Cape Verde Standard Time': 'Atlantic/Cape_Verde', 'Caucasus Standard Time': 'Asia/Yerevan', @@ -26,12 +31,17 @@ 'Central Pacific Standard Time': 'Pacific/Guadalcanal', 'Central Standard Time': 'America/Chicago', 'Central Standard Time (Mexico)': 'America/Mexico_City', + 'Chatham Islands Standard Time': 'Pacific/Chatham', 'China Standard Time': 'Asia/Shanghai', + 'Cuba Standard Time': 'America/Havana', 'Dateline Standard Time': 'Etc/GMT+12', 'E. Africa Standard Time': 'Africa/Nairobi', 'E. Australia Standard Time': 'Australia/Brisbane', + 'E. Europe Standard Time': 'Europe/Chisinau', 'E. South America Standard Time': 'America/Sao_Paulo', + 'Easter Island Standard Time': 'Pacific/Easter', 'Eastern Standard Time': 'America/New_York', + 'Eastern Standard Time (Mexico)': 'America/Cancun', 'Egypt Standard Time': 'Africa/Cairo', 'Ekaterinburg Standard Time': 'Asia/Yekaterinburg', 'FLE Standard Time': 'Europe/Kiev', @@ -41,6 +51,7 @@ 'Georgian Standard Time': 'Asia/Tbilisi', 'Greenland Standard Time': 'America/Godthab', 'Greenwich Standard Time': 'Atlantic/Reykjavik', + 'Haiti Standard Time': 'America/Port-au-Prince', 'Hawaiian Standard Time': 'Pacific/Honolulu', 'India Standard Time': 'Asia/Calcutta', 'Iran Standard Time': 'Asia/Tehran', @@ -50,7 +61,9 @@ 'Korea Standard Time': 'Asia/Seoul', 'Libya Standard Time': 'Africa/Tripoli', 'Line Islands Standard Time': 'Pacific/Kiritimati', + 'Lord Howe Standard Time': 'Australia/Lord_Howe', 'Magadan Standard Time': 'Asia/Magadan', + 'Marquesas Standard Time': 'Pacific/Marquesas', 'Mauritius Standard Time': 'Indian/Mauritius', 'Middle East Standard Time': 'Asia/Beirut', 'Montevideo Standard Time': 'America/Montevideo', @@ -63,11 +76,14 @@ 'Nepal Standard Time': 'Asia/Katmandu', 'New Zealand Standard Time': 'Pacific/Auckland', 'Newfoundland Standard Time': 'America/St_Johns', + 'Norfolk Standard Time': 'Pacific/Norfolk', 'North Asia East Standard Time': 'Asia/Irkutsk', 'North Asia Standard Time': 'Asia/Krasnoyarsk', + 'North Korea Standard Time': 'Asia/Pyongyang', + 'Omsk Standard Time': 'Asia/Omsk', 'Pacific SA Standard Time': 'America/Santiago', 'Pacific Standard Time': 'America/Los_Angeles', - 'Pacific Standard Time (Mexico)': 'America/Santa_Isabel', + 'Pacific Standard Time (Mexico)': 'America/Tijuana', 'Pakistan Standard Time': 'Asia/Karachi', 'Paraguay Standard Time': 'America/Asuncion', 'Romance Standard Time': 'Europe/Paris', @@ -79,6 +95,8 @@ 'SA Pacific Standard Time': 'America/Bogota', 'SA Western Standard Time': 'America/La_Paz', 'SE Asia Standard Time': 'Asia/Bangkok', + 'Saint Pierre Standard Time': 'America/Miquelon', + 'Sakhalin Standard Time': 'Asia/Sakhalin', 'Samoa Standard Time': 'Pacific/Apia', 'Singapore Standard Time': 'Asia/Singapore', 'South Africa Standard Time': 'Africa/Johannesburg', @@ -86,14 +104,20 @@ 'Syria Standard Time': 'Asia/Damascus', 'Taipei Standard Time': 'Asia/Taipei', 'Tasmania Standard Time': 'Australia/Hobart', + 'Tocantins Standard Time': 'America/Araguaina', 'Tokyo Standard Time': 'Asia/Tokyo', + 'Tomsk Standard Time': 'Asia/Tomsk', 'Tonga Standard Time': 'Pacific/Tongatapu', + 'Transbaikal Standard Time': 'Asia/Chita', 'Turkey Standard Time': 'Europe/Istanbul', + 'Turks And Caicos Standard Time': 'America/Grand_Turk', 'US Eastern Standard Time': 'America/Indianapolis', 'US Mountain Standard Time': 'America/Phoenix', 'UTC': 'Etc/GMT', 'UTC+12': 'Etc/GMT-12', 'UTC-02': 'Etc/GMT+2', + 'UTC-08': 'Etc/GMT+8', + 'UTC-09': 'Etc/GMT+9', 'UTC-11': 'Etc/GMT+11', 'Ulaanbaatar Standard Time': 'Asia/Ulaanbaatar', 'Venezuela Standard Time': 'America/Caracas', @@ -101,7 +125,9 @@ 'W. Australia Standard Time': 'Australia/Perth', 'W. Central Africa Standard Time': 'Africa/Lagos', 'W. Europe Standard Time': 'Europe/Berlin', + 'W. Mongolia Standard Time': 'Asia/Hovd', 'West Asia Standard Time': 'Asia/Tashkent', + 'West Bank Standard Time': 'Asia/Hebron', 'West Pacific Standard Time': 'Pacific/Port_Moresby', 'Yakutsk Standard Time': 'Asia/Yakutsk'} @@ -160,10 +186,11 @@ 'Africa/Tripoli': 'Libya Standard Time', 'Africa/Tunis': 'W. Central Africa Standard Time', 'Africa/Windhoek': 'Namibia Standard Time', + 'America/Adak': 'Aleutian Standard Time', 'America/Anchorage': 'Alaskan Standard Time', 'America/Anguilla': 'SA Western Standard Time', 'America/Antigua': 'SA Western Standard Time', - 'America/Araguaina': 'SA Eastern Standard Time', + 'America/Araguaina': 'Tocantins Standard Time', 'America/Argentina/La_Rioja': 'Argentina Standard Time', 'America/Argentina/Rio_Gallegos': 'Argentina Standard Time', 'America/Argentina/Salta': 'Argentina Standard Time', @@ -185,7 +212,7 @@ 'America/Buenos_Aires': 'Argentina Standard Time', 'America/Cambridge_Bay': 'Mountain Standard Time', 'America/Campo_Grande': 'Central Brazilian Standard Time', - 'America/Cancun': 'Central Standard Time (Mexico)', + 'America/Cancun': 'Eastern Standard Time (Mexico)', 'America/Caracas': 'Venezuela Standard Time', 'America/Catamarca': 'Argentina Standard Time', 'America/Cayenne': 'SA Eastern Standard Time', @@ -207,18 +234,19 @@ 'America/Edmonton': 'Mountain Standard Time', 'America/Eirunepe': 'SA Pacific Standard Time', 'America/El_Salvador': 'Central America Standard Time', + 'America/Fort_Nelson': 'US Mountain Standard Time', 'America/Fortaleza': 'SA Eastern Standard Time', 'America/Glace_Bay': 'Atlantic Standard Time', 'America/Godthab': 'Greenland Standard Time', 'America/Goose_Bay': 'Atlantic Standard Time', - 'America/Grand_Turk': 'SA Western Standard Time', + 'America/Grand_Turk': 'Turks And Caicos Standard Time', 'America/Grenada': 'SA Western Standard Time', 'America/Guadeloupe': 'SA Western Standard Time', 'America/Guatemala': 'Central America Standard Time', 'America/Guayaquil': 'SA Pacific Standard Time', 'America/Guyana': 'SA Western Standard Time', 'America/Halifax': 'Atlantic Standard Time', - 'America/Havana': 'Eastern Standard Time', + 'America/Havana': 'Cuba Standard Time', 'America/Hermosillo': 'US Mountain Standard Time', 'America/Indiana/Knox': 'Central Standard Time', 'America/Indiana/Marengo': 'US Eastern Standard Time', @@ -250,7 +278,9 @@ 'America/Mendoza': 'Argentina Standard Time', 'America/Menominee': 'Central Standard Time', 'America/Merida': 'Central Standard Time (Mexico)', + 'America/Metlakatla': 'Alaskan Standard Time', 'America/Mexico_City': 'Central Standard Time (Mexico)', + 'America/Miquelon': 'Saint Pierre Standard Time', 'America/Moncton': 'Atlantic Standard Time', 'America/Monterrey': 'Central Standard Time (Mexico)', 'America/Montevideo': 'Montevideo Standard Time', @@ -269,10 +299,11 @@ 'America/Pangnirtung': 'Eastern Standard Time', 'America/Paramaribo': 'SA Eastern Standard Time', 'America/Phoenix': 'US Mountain Standard Time', - 'America/Port-au-Prince': 'Eastern Standard Time', + 'America/Port-au-Prince': 'Haiti Standard Time', 'America/Port_of_Spain': 'SA Western Standard Time', 'America/Porto_Velho': 'SA Western Standard Time', 'America/Puerto_Rico': 'SA Western Standard Time', + 'America/Punta_Arenas': 'SA Eastern Standard Time', 'America/Rainy_River': 'Central Standard Time', 'America/Rankin_Inlet': 'Central Standard Time', 'America/Recife': 'SA Eastern Standard Time', @@ -296,7 +327,7 @@ 'America/Tegucigalpa': 'Central America Standard Time', 'America/Thule': 'Atlantic Standard Time', 'America/Thunder_Bay': 'Eastern Standard Time', - 'America/Tijuana': 'Pacific Standard Time', + 'America/Tijuana': 'Pacific Standard Time (Mexico)', 'America/Toronto': 'Eastern Standard Time', 'America/Tortola': 'SA Western Standard Time', 'America/Vancouver': 'Pacific Standard Time', @@ -304,13 +335,13 @@ 'America/Winnipeg': 'Central Standard Time', 'America/Yakutat': 'Alaskan Standard Time', 'America/Yellowknife': 'Mountain Standard Time', - 'Antarctica/Casey': 'W. Australia Standard Time', + 'Antarctica/Casey': 'Central Pacific Standard Time', 'Antarctica/Davis': 'SE Asia Standard Time', 'Antarctica/DumontDUrville': 'West Pacific Standard Time', 'Antarctica/Macquarie': 'Central Pacific Standard Time', 'Antarctica/Mawson': 'West Asia Standard Time', 'Antarctica/McMurdo': 'New Zealand Standard Time', - 'Antarctica/Palmer': 'Pacific SA Standard Time', + 'Antarctica/Palmer': 'SA Eastern Standard Time', 'Antarctica/Rothera': 'SA Eastern Standard Time', 'Antarctica/Syowa': 'E. Africa Standard Time', 'Antarctica/Vostok': 'Central Asia Standard Time', @@ -322,15 +353,17 @@ 'Asia/Aqtau': 'West Asia Standard Time', 'Asia/Aqtobe': 'West Asia Standard Time', 'Asia/Ashgabat': 'West Asia Standard Time', + 'Asia/Atyrau': 'West Asia Standard Time', 'Asia/Baghdad': 'Arabic Standard Time', 'Asia/Bahrain': 'Arab Standard Time', 'Asia/Baku': 'Azerbaijan Standard Time', 'Asia/Bangkok': 'SE Asia Standard Time', + 'Asia/Barnaul': 'Altai Standard Time', 'Asia/Beirut': 'Middle East Standard Time', 'Asia/Bishkek': 'Central Asia Standard Time', 'Asia/Brunei': 'Singapore Standard Time', 'Asia/Calcutta': 'India Standard Time', - 'Asia/Chita': 'North Asia East Standard Time', + 'Asia/Chita': 'Transbaikal Standard Time', 'Asia/Choibalsan': 'Ulaanbaatar Standard Time', 'Asia/Colombo': 'Sri Lanka Standard Time', 'Asia/Damascus': 'Syria Standard Time', @@ -338,8 +371,11 @@ 'Asia/Dili': 'Tokyo Standard Time', 'Asia/Dubai': 'Arabian Standard Time', 'Asia/Dushanbe': 'West Asia Standard Time', + 'Asia/Famagusta': 'Turkey Standard Time', + 'Asia/Gaza': 'West Bank Standard Time', + 'Asia/Hebron': 'West Bank Standard Time', 'Asia/Hong_Kong': 'China Standard Time', - 'Asia/Hovd': 'SE Asia Standard Time', + 'Asia/Hovd': 'W. Mongolia Standard Time', 'Asia/Irkutsk': 'North Asia East Standard Time', 'Asia/Jakarta': 'SE Asia Standard Time', 'Asia/Jayapura': 'Tokyo Standard Time', @@ -361,17 +397,17 @@ 'Asia/Nicosia': 'GTB Standard Time', 'Asia/Novokuznetsk': 'North Asia Standard Time', 'Asia/Novosibirsk': 'N. Central Asia Standard Time', - 'Asia/Omsk': 'N. Central Asia Standard Time', + 'Asia/Omsk': 'Omsk Standard Time', 'Asia/Oral': 'West Asia Standard Time', 'Asia/Phnom_Penh': 'SE Asia Standard Time', 'Asia/Pontianak': 'SE Asia Standard Time', - 'Asia/Pyongyang': 'Korea Standard Time', + 'Asia/Pyongyang': 'North Korea Standard Time', 'Asia/Qatar': 'Arab Standard Time', 'Asia/Qyzylorda': 'Central Asia Standard Time', 'Asia/Rangoon': 'Myanmar Standard Time', 'Asia/Riyadh': 'Arab Standard Time', 'Asia/Saigon': 'SE Asia Standard Time', - 'Asia/Sakhalin': 'Vladivostok Standard Time', + 'Asia/Sakhalin': 'Sakhalin Standard Time', 'Asia/Samarkand': 'West Asia Standard Time', 'Asia/Seoul': 'Korea Standard Time', 'Asia/Shanghai': 'China Standard Time', @@ -383,6 +419,7 @@ 'Asia/Tehran': 'Iran Standard Time', 'Asia/Thimphu': 'Bangladesh Standard Time', 'Asia/Tokyo': 'Tokyo Standard Time', + 'Asia/Tomsk': 'Tomsk Standard Time', 'Asia/Ulaanbaatar': 'Ulaanbaatar Standard Time', 'Asia/Urumqi': 'Central Asia Standard Time', 'Asia/Ust-Nera': 'Vladivostok Standard Time', @@ -406,8 +443,10 @@ 'Australia/Broken_Hill': 'Cen. Australia Standard Time', 'Australia/Currie': 'Tasmania Standard Time', 'Australia/Darwin': 'AUS Central Standard Time', + 'Australia/Eucla': 'Aus Central W. Standard Time', 'Australia/Hobart': 'Tasmania Standard Time', 'Australia/Lindeman': 'E. Australia Standard Time', + 'Australia/Lord_Howe': 'Lord Howe Standard Time', 'Australia/Melbourne': 'AUS Eastern Standard Time', 'Australia/Perth': 'W. Australia Standard Time', 'Australia/Sydney': 'AUS Eastern Standard Time', @@ -424,6 +463,8 @@ 'Etc/GMT+5': 'SA Pacific Standard Time', 'Etc/GMT+6': 'Central America Standard Time', 'Etc/GMT+7': 'US Mountain Standard Time', + 'Etc/GMT+8': 'UTC-08', + 'Etc/GMT+9': 'UTC-09', 'Etc/GMT-1': 'W. Central Africa Standard Time', 'Etc/GMT-10': 'West Pacific Standard Time', 'Etc/GMT-11': 'Central Pacific Standard Time', @@ -441,6 +482,7 @@ 'Etc/UTC': 'UTC', 'Europe/Amsterdam': 'W. Europe Standard Time', 'Europe/Andorra': 'W. Europe Standard Time', + 'Europe/Astrakhan': 'Astrakhan Standard Time', 'Europe/Athens': 'GTB Standard Time', 'Europe/Belgrade': 'Central Europe Standard Time', 'Europe/Berlin': 'W. Europe Standard Time', @@ -449,7 +491,7 @@ 'Europe/Bucharest': 'GTB Standard Time', 'Europe/Budapest': 'Central Europe Standard Time', 'Europe/Busingen': 'W. Europe Standard Time', - 'Europe/Chisinau': 'GTB Standard Time', + 'Europe/Chisinau': 'E. Europe Standard Time', 'Europe/Copenhagen': 'Romance Standard Time', 'Europe/Dublin': 'GMT Standard Time', 'Europe/Gibraltar': 'W. Europe Standard Time', @@ -460,6 +502,7 @@ 'Europe/Jersey': 'GMT Standard Time', 'Europe/Kaliningrad': 'Kaliningrad Standard Time', 'Europe/Kiev': 'FLE Standard Time', + 'Europe/Kirov': 'Russian Standard Time', 'Europe/Lisbon': 'GMT Standard Time', 'Europe/Ljubljana': 'Central Europe Standard Time', 'Europe/London': 'GMT Standard Time', @@ -479,12 +522,14 @@ 'Europe/Samara': 'Russia Time Zone 3', 'Europe/San_Marino': 'W. Europe Standard Time', 'Europe/Sarajevo': 'Central European Standard Time', + 'Europe/Saratov': 'Astrakhan Standard Time', 'Europe/Simferopol': 'Russian Standard Time', 'Europe/Skopje': 'Central European Standard Time', 'Europe/Sofia': 'FLE Standard Time', 'Europe/Stockholm': 'W. Europe Standard Time', 'Europe/Tallinn': 'FLE Standard Time', 'Europe/Tirane': 'Central Europe Standard Time', + 'Europe/Ulyanovsk': 'Astrakhan Standard Time', 'Europe/Uzhgorod': 'FLE Standard Time', 'Europe/Vaduz': 'W. Europe Standard Time', 'Europe/Vatican': 'W. Europe Standard Time', @@ -510,12 +555,16 @@ 'PST8PDT': 'Pacific Standard Time', 'Pacific/Apia': 'Samoa Standard Time', 'Pacific/Auckland': 'New Zealand Standard Time', + 'Pacific/Bougainville': 'Bougainville Standard Time', + 'Pacific/Chatham': 'Chatham Islands Standard Time', + 'Pacific/Easter': 'Easter Island Standard Time', 'Pacific/Efate': 'Central Pacific Standard Time', 'Pacific/Enderbury': 'Tonga Standard Time', 'Pacific/Fakaofo': 'Tonga Standard Time', 'Pacific/Fiji': 'Fiji Standard Time', 'Pacific/Funafuti': 'UTC+12', 'Pacific/Galapagos': 'Central America Standard Time', + 'Pacific/Gambier': 'UTC-09', 'Pacific/Guadalcanal': 'Central Pacific Standard Time', 'Pacific/Guam': 'West Pacific Standard Time', 'Pacific/Honolulu': 'Hawaiian Standard Time', @@ -524,12 +573,15 @@ 'Pacific/Kosrae': 'Central Pacific Standard Time', 'Pacific/Kwajalein': 'UTC+12', 'Pacific/Majuro': 'UTC+12', + 'Pacific/Marquesas': 'Marquesas Standard Time', 'Pacific/Midway': 'UTC-11', 'Pacific/Nauru': 'UTC+12', 'Pacific/Niue': 'UTC-11', + 'Pacific/Norfolk': 'Norfolk Standard Time', 'Pacific/Noumea': 'Central Pacific Standard Time', 'Pacific/Pago_Pago': 'UTC-11', 'Pacific/Palau': 'Tokyo Standard Time', + 'Pacific/Pitcairn': 'UTC-08', 'Pacific/Ponape': 'Central Pacific Standard Time', 'Pacific/Port_Moresby': 'West Pacific Standard Time', 'Pacific/Rarotonga': 'Hawaiian Standard Time', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tzlocal-1.1.3/tzlocal.egg-info/PKG-INFO new/tzlocal-1.4/tzlocal.egg-info/PKG-INFO --- old/tzlocal-1.1.3/tzlocal.egg-info/PKG-INFO 2015-04-08 15:32:12.000000000 +0200 +++ new/tzlocal-1.4/tzlocal.egg-info/PKG-INFO 2017-04-18 18:51:45.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: tzlocal -Version: 1.1.3 +Version: 1.4 Summary: tzinfo object for the local timezone Home-page: https://github.com/regebro/tzlocal Author: Lennart Regebro @@ -52,9 +52,9 @@ Create a local datetime: >>> from datetime import datetime - >>> dt = tz.localize(datetime.now()) + >>> dt = tz.localize(datetime(2015, 4, 10, 7, 22)) >>> dt - datetime.datetime(2012, 9, 11, 14, 43, 42, 518871, tzinfo=<DstTzInfo 'Europe/Warsaw' CEST+2:00:00 DST>) + datetime.datetime(2015, 4, 10, 7, 22, tzinfo=<DstTzInfo 'Europe/Warsaw' CEST+2:00:00 DST>) Lookup another timezone with `pytz`: @@ -63,8 +63,8 @@ Convert the datetime: - >>> eastern.normalize(dt.astimezone(eastern)) - datetime.datetime(2012, 9, 11, 8, 43, 42, 518871, tzinfo=<DstTzInfo 'US/Eastern' EDT-1 day, 20:00:00 DST>) + >>> dt.astimezone(eastern) + datetime.datetime(2015, 4, 10, 1, 22, tzinfo=<DstTzInfo 'US/Eastern' EDT-1 day, 20:00:00 DST>) Maintainer @@ -80,6 +80,13 @@ * Manuel Ebert * Xiaokun Zhu * Cameris + * Edward Betts + * McK KIM + * Cris Ewing + * Ayala Shachar + * Lev Maximov + * Jakub Wilk + * John Quarles (Sorry if I forgot someone) @@ -92,9 +99,57 @@ Changes ======= - 1.1.3 (2015-04-08) + 1.4 (2017-04-18) + ---------------- + + - I use MIT on my other projects, so relicensing. + + + 1.4b1 (2017-04-14) ------------------ + - Dropping support for Python versions nobody uses (2.5, 3.1, 3.2), adding 3.6 + Python 3.1 and 3.2 still works, 2.5 has been broken for some time. + + - Ayalash's OS X fix didn't work on Python 2.7, fixed that. + + + 1.3.2 (2017-04-12) + ------------------ + + - Ensure closing of subprocess on OS X (ayalash) + + - Removed unused imports (jwilk) + + - Closes stdout and stderr to get rid of ResourceWarnings (johnwquarles) + + - Updated Windows timezones (axil) + + + 1.3 (2016-10-15) + ---------------- + + - #34: Added support for /var/db/zoneinfo + + + 1.2.2 (2016-03-02) + ------------------ + + - #30: Fixed a bug on OS X. + + + 1.2.1 (2016-02-28) + ------------------ + + - Tests failed if TZ was set in the environment. (EdwardBetts) + + - Replaces os.popen() with subprocess.Popen() for OS X to + handle when systemsetup doesn't exist. (mckabi, cewing) + + + 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) @@ -165,15 +220,15 @@ Keywords: timezone pytz Platform: UNKNOWN -Classifier: Development Status :: 4 - Beta -Classifier: License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication +Classifier: Development Status :: 5 - Production/Stable +Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: Microsoft :: Windows Classifier: Operating System :: Unix Classifier: Operating System :: MacOS :: MacOS X -Classifier: Programming Language :: Python :: 2.5 Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3.1 -Classifier: Programming Language :: Python :: 3.2 +Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tzlocal-1.1.3/tzlocal.egg-info/SOURCES.txt new/tzlocal-1.4/tzlocal.egg-info/SOURCES.txt --- old/tzlocal-1.1.3/tzlocal.egg-info/SOURCES.txt 2015-04-08 15:32:12.000000000 +0200 +++ new/tzlocal-1.4/tzlocal.egg-info/SOURCES.txt 2017-04-18 18:51:45.000000000 +0200 @@ -14,7 +14,6 @@ tzlocal.egg-info/PKG-INFO tzlocal.egg-info/SOURCES.txt tzlocal.egg-info/dependency_links.txt -tzlocal.egg-info/pbr.json tzlocal.egg-info/requires.txt tzlocal.egg-info/top_level.txt tzlocal.egg-info/zip-safe @@ -24,4 +23,5 @@ tzlocal/test_data/symlink_localtime/usr/share/zoneinfo/Africa/Harare tzlocal/test_data/timezone/etc/timezone tzlocal/test_data/timezone_setting/etc/conf.d/clock +tzlocal/test_data/vardbzoneinfo/var/db/zoneinfo tzlocal/test_data/zone_setting/etc/sysconfig/clock \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tzlocal-1.1.3/tzlocal.egg-info/pbr.json new/tzlocal-1.4/tzlocal.egg-info/pbr.json --- old/tzlocal-1.1.3/tzlocal.egg-info/pbr.json 2015-04-08 15:32:12.000000000 +0200 +++ new/tzlocal-1.4/tzlocal.egg-info/pbr.json 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -{"is_release": true, "git_version": "8e3bae6"} \ No newline at end of file