Mercurial > piecrust2
diff tests/conftest.py @ 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 | 97c1dc568810 |
children | 8ac2d6045d1d |
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: