Message230703
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__ |
|
Date |
User |
Action |
Args |
2014-11-05 18:13:08 | pitrou | set | recipients:
+ pitrou, lemburg, belopolsky, lars.gustaebel, serhiy.storchaka, David.Edelsohn |
2014-11-05 18:13:08 | pitrou | set | messageid: <1415211188.3.0.957111869485.issue20220@psf.upfronthosting.co.za> |
2014-11-05 18:13:08 | pitrou | link | issue20220 messages |
2014-11-05 18:13:08 | pitrou | create | |
|