changeset 788:276030ea7972

tests: Try and finally fix the time-based tests.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 05 Sep 2016 21:02:03 -0700
parents f6f9a284a5f3
children b8e760b3413e
files tests/conftest.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/conftest.py	Thu Sep 01 23:00:58 2016 -0700
+++ b/tests/conftest.py	Mon Sep 05 21:02:03 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.gmtime(ctx.time)
+            left_time = time.localtime(ctx.time)
             difference = time.mktime(left_time) - time.mktime(right_time)
             print("Got time difference: %d" % difference)
             if abs(difference) <= 2: