summaryrefslogtreecommitdiff
path: root/lib/torture
diff options
context:
space:
mode:
authorJamie McClymont <jamiemcclymont@catalyst.net.nz>2018-01-25 17:23:06 +1300
committerAndreas Schneider <asn@cryptomilk.org>2018-03-22 13:26:44 +0100
commitdd1f8cdf6bd1fb9c881d96957d709b0f517852bb (patch)
treeaad38b3302f0be02c47dff614b277f70ec82b1a9 /lib/torture
parentba805dcd6f95748d77e24d5de7c31af2ff5848b1 (diff)
downloadsamba-dd1f8cdf6bd1fb9c881d96957d709b0f517852bb.tar.gz
selftest: consistently produce high-res UTC time
Currently some subunit reporters throughout the codebase provide low-res time, meaning timestamps jump back and forth in the subunit file. Also, some subunit reporters produce UTC timestamps while others produce local time. UTC was chosen as the standard for this commit since all of the timestamps end with a Z (= Zulu = UTC). Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Mar 22 13:26:44 CET 2018 on sn-devel-144
Diffstat (limited to 'lib/torture')
-rw-r--r--lib/torture/subunit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/torture/subunit.c b/lib/torture/subunit.c
index 46f1b65053d..deb96ffa3a9 100644
--- a/lib/torture/subunit.c
+++ b/lib/torture/subunit.c
@@ -62,9 +62,9 @@ static void torture_subunit_report_time(struct torture_context *tctx)
return;
}
- tmp = localtime(&tp.tv_sec);
+ tmp = gmtime(&tp.tv_sec);
if (!tmp) {
- perror("localtime");
+ perror("gmtime");
return;
}