diff tests/conftest.py @ 806:8ac2d6045d1d

tests: Fix for time comparisons.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 23 Oct 2016 21:01:01 -0700
parents 276030ea7972
children 72f17534d58e
line wrap: on
line diff
--- a/tests/conftest.py	Mon Oct 10 21:41:59 2016 -0700
+++ b/tests/conftest.py	Sun Oct 23 21:01:01 2016 -0700
@@ -546,7 +546,7 @@
             # values are within a few seconds of each other (usually 0 or 1).
             right_time_str = right[i:i + len(test_time_iso8601)]
             right_time = time.strptime(right_time_str, '%Y-%m-%dT%H:%M:%SZ')
-            left_time = time.localtime(ctx.time)
+            left_time = time.gmtime(ctx.time)
             difference = time.mktime(left_time) - time.mktime(right_time)
             print("Got time difference: %d" % difference)
             if abs(difference) <= 2: