summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/twisted/files/twisted-12.0.0-fix-test-timeFormatting.patch')
-rw-r--r--dev-python/twisted/files/twisted-12.0.0-fix-test-timeFormatting.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/dev-python/twisted/files/twisted-12.0.0-fix-test-timeFormatting.patch b/dev-python/twisted/files/twisted-12.0.0-fix-test-timeFormatting.patch
new file mode 100644
index 000000000000..a466a973f959
--- /dev/null
+++ b/dev-python/twisted/files/twisted-12.0.0-fix-test-timeFormatting.patch
@@ -0,0 +1,26 @@
+Apply patch: use calendar.timegm instead of manual broken timezone math.
+
+Author: marienz
+Review: itamar
+Fixes: #5583
+
+Index: /trunk/twisted/test/test_log.py
+===================================================================
+--- /trunk/twisted/test/test_log.py (revision 32453)
++++ /trunk/twisted/test/test_log.py (revision 34145)
+@@ -6,5 +6,5 @@
+ """
+
+-import os, sys, time, logging, warnings
++import os, sys, time, logging, warnings, calendar
+ from cStringIO import StringIO
+
+@@ -392,7 +392,5 @@
+ human-readable string.
+ """
+- # There is no function in the time module which converts a UTC time
+- # tuple to a timestamp.
+- when = time.mktime((2001, 2, 3, 4, 5, 6, 7, 8, 0)) - time.timezone
++ when = calendar.timegm((2001, 2, 3, 4, 5, 6, 7, 8, 0))
+
+ # Pretend to be in US/Eastern for a moment