This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients David.Edelsohn, belopolsky, lars.gustaebel, lemburg, pitrou, serhiy.storchaka
Date 2014-11-05.18:13:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1415211188.3.0.957111869485.issue20220@psf.upfronthosting.co.za>
In-reply-to
Content
First unsetting TZ seems to fix it:

diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -1507,11 +1507,11 @@ def run_with_tz(tz):
             try:
                 return func(*args, **kwds)
             finally:
-                if orig_tz is None:
-                    del os.environ['TZ']
-                else:
+                del os.environ['TZ']
+                time.tzset()
+                if orig_tz is not None:
                     os.environ['TZ'] = orig_tz
-                time.tzset()
+                    time.tzset()
 
         inner.__name__ = func.__name__
         inner.__doc__ = func.__doc__
History
Date User Action Args
2014-11-05 18:13:08pitrousetrecipients: + pitrou, lemburg, belopolsky, lars.gustaebel, serhiy.storchaka, David.Edelsohn
2014-11-05 18:13:08pitrousetmessageid: <1415211188.3.0.957111869485.issue20220@psf.upfronthosting.co.za>
2014-11-05 18:13:08pitroulinkissue20220 messages
2014-11-05 18:13:08pitroucreate