[Python-modules-commits] [python-tzlocal] 01/05: Import python-tzlocal_1.2.2.orig.tar.gz
Edward Betts
edward at moszumanska.debian.org
Wed Mar 23 07:09:31 UTC 2016
This is an automated email from the git hooks/post-receive script.
edward pushed a commit to branch master
in repository python-tzlocal.
commit 4bc7bb949483a2b060972d7d7c66f73d21df3070
Author: Edward Betts <edward at 4angle.com>
Date: Tue Mar 22 10:03:11 2016 +0000
Import python-tzlocal_1.2.2.orig.tar.gz
---
CHANGES.txt | 15 +++++++++++++++
PKG-INFO | 23 +++++++++++++++++++++--
README.rst | 5 ++++-
setup.py | 3 ++-
tzlocal.egg-info/PKG-INFO | 23 +++++++++++++++++++++--
tzlocal.egg-info/SOURCES.txt | 1 -
tzlocal.egg-info/pbr.json | 1 -
tzlocal.egg-info/requires.txt | 2 +-
tzlocal/darwin.py | 14 ++++++++++++--
tzlocal/tests.py | 3 +++
tzlocal/windows_tz.py | 20 +++++++++++++-------
11 files changed, 92 insertions(+), 18 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 2d872ff..051ccca 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,21 @@
Changes
=======
+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)
----------------
diff --git a/PKG-INFO b/PKG-INFO
index c570e40..8c9f14f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: tzlocal
-Version: 1.2
+Version: 1.2.2
Summary: tzinfo object for the local timezone
Home-page: https://github.com/regebro/tzlocal
Author: Lennart Regebro
@@ -64,7 +64,7 @@ Description: tzlocal
Convert the datetime:
>>> dt.astimezone(eastern)
- datetime.datetime(2015, 4, 10, 1, 2, tzinfo=<DstTzInfo 'US/Eastern' EDT-1 day, 20:00:00 DST>)
+ datetime.datetime(2015, 4, 10, 1, 22, tzinfo=<DstTzInfo 'US/Eastern' EDT-1 day, 20:00:00 DST>)
Maintainer
@@ -80,6 +80,9 @@ Description: tzlocal
* Manuel Ebert
* Xiaokun Zhu
* Cameris
+ * Edward Betts
+ * McK KIM
+ * Cris Ewing
(Sorry if I forgot someone)
@@ -92,6 +95,21 @@ Description: tzlocal
Changes
=======
+ 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)
----------------
@@ -177,3 +195,4 @@ Classifier: Programming Language :: Python :: 3.1
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
diff --git a/README.rst b/README.rst
index 2abe7ef..23acba5 100644
--- a/README.rst
+++ b/README.rst
@@ -56,7 +56,7 @@ Lookup another timezone with `pytz`:
Convert the datetime:
>>> dt.astimezone(eastern)
- datetime.datetime(2015, 4, 10, 1, 2, tzinfo=<DstTzInfo 'US/Eastern' EDT-1 day, 20:00:00 DST>)
+ datetime.datetime(2015, 4, 10, 1, 22, tzinfo=<DstTzInfo 'US/Eastern' EDT-1 day, 20:00:00 DST>)
Maintainer
@@ -72,6 +72,9 @@ Contributors
* Manuel Ebert
* Xiaokun Zhu
* Cameris
+* Edward Betts
+* McK KIM
+* Cris Ewing
(Sorry if I forgot someone)
diff --git a/setup.py b/setup.py
index 25e7170..5189d6e 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import sys, os
-version = '1.2'
+version = '1.2.2'
setup(name='tzlocal',
version=version,
@@ -20,6 +20,7 @@ setup(name='tzlocal',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
+ 'Programming Language :: Python :: 3.5',
], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='timezone pytz',
author='Lennart Regebro',
diff --git a/tzlocal.egg-info/PKG-INFO b/tzlocal.egg-info/PKG-INFO
index c570e40..8c9f14f 100644
--- a/tzlocal.egg-info/PKG-INFO
+++ b/tzlocal.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: tzlocal
-Version: 1.2
+Version: 1.2.2
Summary: tzinfo object for the local timezone
Home-page: https://github.com/regebro/tzlocal
Author: Lennart Regebro
@@ -64,7 +64,7 @@ Description: tzlocal
Convert the datetime:
>>> dt.astimezone(eastern)
- datetime.datetime(2015, 4, 10, 1, 2, tzinfo=<DstTzInfo 'US/Eastern' EDT-1 day, 20:00:00 DST>)
+ datetime.datetime(2015, 4, 10, 1, 22, tzinfo=<DstTzInfo 'US/Eastern' EDT-1 day, 20:00:00 DST>)
Maintainer
@@ -80,6 +80,9 @@ Description: tzlocal
* Manuel Ebert
* Xiaokun Zhu
* Cameris
+ * Edward Betts
+ * McK KIM
+ * Cris Ewing
(Sorry if I forgot someone)
@@ -92,6 +95,21 @@ Description: tzlocal
Changes
=======
+ 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)
----------------
@@ -177,3 +195,4 @@ Classifier: Programming Language :: Python :: 3.1
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
diff --git a/tzlocal.egg-info/SOURCES.txt b/tzlocal.egg-info/SOURCES.txt
index c71349e..928b7e8 100644
--- a/tzlocal.egg-info/SOURCES.txt
+++ b/tzlocal.egg-info/SOURCES.txt
@@ -14,7 +14,6 @@ tzlocal/windows_tz.py
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
diff --git a/tzlocal.egg-info/pbr.json b/tzlocal.egg-info/pbr.json
deleted file mode 100644
index ee6f674..0000000
--- a/tzlocal.egg-info/pbr.json
+++ /dev/null
@@ -1 +0,0 @@
-{"is_release": true, "git_version": "440ede1"}
\ No newline at end of file
diff --git a/tzlocal.egg-info/requires.txt b/tzlocal.egg-info/requires.txt
index 9850437..af44f19 100644
--- a/tzlocal.egg-info/requires.txt
+++ b/tzlocal.egg-info/requires.txt
@@ -1 +1 @@
-pytz
\ No newline at end of file
+pytz
diff --git a/tzlocal/darwin.py b/tzlocal/darwin.py
index 86fd906..bedbbd1 100644
--- a/tzlocal/darwin.py
+++ b/tzlocal/darwin.py
@@ -1,17 +1,27 @@
from __future__ import with_statement
import os
import pytz
+import subprocess
_cache_tz = None
+
def _get_localzone():
- tzname = os.popen("systemsetup -gettimezone").read().replace("Time Zone: ", "").strip()
+ pipe = subprocess.Popen(
+ "systemsetup -gettimezone",
+ shell=True,
+ stderr=subprocess.PIPE,
+ stdout=subprocess.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")
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 +29,9 @@ def get_localzone():
_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 --git a/tzlocal/tests.py b/tzlocal/tests.py
index 831738d..6f70f14 100644
--- a/tzlocal/tests.py
+++ b/tzlocal/tests.py
@@ -6,6 +6,9 @@ import pytz
import tzlocal.unix
class TzLocalTests(unittest.TestCase):
+ def setUp(self):
+ if 'TZ' in os.environ:
+ del os.environ['TZ']
def test_env(self):
tz_harare = tzlocal.unix._tz_from_env(':Africa/Harare')
diff --git a/tzlocal/windows_tz.py b/tzlocal/windows_tz.py
index 0790bb4..f8afca2 100644
--- a/tzlocal/windows_tz.py
+++ b/tzlocal/windows_tz.py
@@ -30,8 +30,10 @@ win_tz = {'AUS Central Standard Time': 'Australia/Darwin',
'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',
'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',
@@ -65,9 +67,9 @@ win_tz = {'AUS Central Standard Time': 'Australia/Darwin',
'Newfoundland Standard Time': 'America/St_Johns',
'North Asia East Standard Time': 'Asia/Irkutsk',
'North Asia Standard Time': 'Asia/Krasnoyarsk',
+ 'North Korea Standard Time': 'Asia/Pyongyang',
'Pacific SA Standard Time': 'America/Santiago',
'Pacific Standard Time': 'America/Los_Angeles',
- 'Pacific Standard Time (Mexico)': 'America/Santa_Isabel',
'Pakistan Standard Time': 'Asia/Karachi',
'Paraguay Standard Time': 'America/Asuncion',
'Romance Standard Time': 'Europe/Paris',
@@ -185,7 +187,7 @@ tz_win = {'Africa/Abidjan': 'Greenwich Standard Time',
'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,6 +209,7 @@ tz_win = {'Africa/Abidjan': 'Greenwich Standard Time',
'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',
@@ -250,6 +253,7 @@ tz_win = {'Africa/Abidjan': 'Greenwich Standard Time',
'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/Moncton': 'Atlantic Standard Time',
'America/Monterrey': 'Central Standard Time (Mexico)',
@@ -279,7 +283,7 @@ tz_win = {'Africa/Abidjan': 'Greenwich Standard Time',
'America/Regina': 'Canada Central Standard Time',
'America/Resolute': 'Central Standard Time',
'America/Rio_Branco': 'SA Pacific Standard Time',
- 'America/Santa_Isabel': 'Pacific Standard Time (Mexico)',
+ 'America/Santa_Isabel': 'Pacific Standard Time',
'America/Santarem': 'SA Eastern Standard Time',
'America/Santiago': 'Pacific SA Standard Time',
'America/Santo_Domingo': 'SA Western Standard Time',
@@ -330,7 +334,7 @@ tz_win = {'Africa/Abidjan': 'Greenwich 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': 'Yakutsk Standard Time',
'Asia/Choibalsan': 'Ulaanbaatar Standard Time',
'Asia/Colombo': 'Sri Lanka Standard Time',
'Asia/Damascus': 'Syria Standard Time',
@@ -339,7 +343,6 @@ tz_win = {'Africa/Abidjan': 'Greenwich Standard Time',
'Asia/Dubai': 'Arabian Standard Time',
'Asia/Dushanbe': 'West Asia Standard Time',
'Asia/Hong_Kong': 'China Standard Time',
- 'Asia/Hovd': 'SE Asia Standard Time',
'Asia/Irkutsk': 'North Asia East Standard Time',
'Asia/Jakarta': 'SE Asia Standard Time',
'Asia/Jayapura': 'Tokyo Standard Time',
@@ -365,7 +368,7 @@ tz_win = {'Africa/Abidjan': 'Greenwich 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',
@@ -449,7 +452,7 @@ tz_win = {'Africa/Abidjan': 'Greenwich Standard Time',
'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',
@@ -510,6 +513,8 @@ tz_win = {'Africa/Abidjan': 'Greenwich Standard Time',
'PST8PDT': 'Pacific Standard Time',
'Pacific/Apia': 'Samoa Standard Time',
'Pacific/Auckland': 'New Zealand Standard Time',
+ 'Pacific/Bougainville': 'Central Pacific Standard Time',
+ 'Pacific/Easter': 'SA Pacific Standard Time',
'Pacific/Efate': 'Central Pacific Standard Time',
'Pacific/Enderbury': 'Tonga Standard Time',
'Pacific/Fakaofo': 'Tonga Standard Time',
@@ -527,6 +532,7 @@ tz_win = {'Africa/Abidjan': 'Greenwich Standard Time',
'Pacific/Midway': 'UTC-11',
'Pacific/Nauru': 'UTC+12',
'Pacific/Niue': 'UTC-11',
+ 'Pacific/Norfolk': 'Central Pacific Standard Time',
'Pacific/Noumea': 'Central Pacific Standard Time',
'Pacific/Pago_Pago': 'UTC-11',
'Pacific/Palau': 'Tokyo Standard Time',
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-tzlocal.git
More information about the Python-modules-commits
mailing list