diff options
author | niemeyer <> | 2005-02-24 22:19:03 +0000 |
---|---|---|
committer | niemeyer <> | 2005-02-24 22:19:03 +0000 |
commit | f9dca76775063e1837e55ef480273cd17f63afc3 (patch) | |
tree | 4938c7e23d22973eefe66c4d80b19539b4c79a2b | |
parent | b5cbf03625f6eb309c66b791ee5837fcc5a55cf4 (diff) | |
download | dateutil-f9dca76775063e1837e55ef480273cd17f63afc3.tar.gz |
- Include tzwinlocal in tz.__all__.
- Encode tzwin* standard and daylight saving names to iso-8859-1.
-rw-r--r-- | dateutil/tz.py | 2 | ||||
-rw-r--r-- | dateutil/tzwin.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/dateutil/tz.py b/dateutil/tz.py index 9f1e0e2..ddf3027 100644 --- a/dateutil/tz.py +++ b/dateutil/tz.py @@ -18,7 +18,7 @@ parser = None rrule = None __all__ = ["tzutc", "tzoffset", "tzlocal", "tzfile", "tzrange", - "tzstr", "tzical", "tzwin", "gettz"] + "tzstr", "tzical", "tzwin", "tzwinlocal", "gettz"] try: from dateutil.tzwin import tzwin, tzwinlocal diff --git a/dateutil/tzwin.py b/dateutil/tzwin.py index 63aed1d..05a654f 100644 --- a/dateutil/tzwin.py +++ b/dateutil/tzwin.py @@ -83,8 +83,8 @@ class tzwin(tzwinbase): tzkey.Close() handle.Close() - self._dstname = str(keydict["Dlt"]) - self._stdname = str(keydict["Std"]) + self._stdname = keydict["Std"].encode("iso-8859-1") + self._dstname = keydict["Dlt"].encode("iso-8859-1") self._display = keydict["Display"] @@ -122,8 +122,8 @@ class tzwinlocal(tzwinbase): keydict = valuestodict(tzlocalkey) tzlocalkey.Close() - self._stdname = str(keydict["StandardName"]) - self._dstname = str(keydict["DaylightName"]) + self._stdname = keydict["StandardName"].encode("iso-8859-1") + self._dstname = keydict["DaylightName"].encode("iso-8859-1") try: tzkey = _winreg.OpenKey(handle, "%s\%s"%(TZKEYNAME, self._stdname)) |