From: Joseph Sutton Date: Thu, 17 Aug 2023 00:46:17 +0000 (+1200) Subject: selftest: Fix subunit reporting the time incorrectly X-Git-Tag: tevent-0.16.0~866 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc41a35a9bd8706d8a3770a2b8f1467cd00452b8;p=thirdparty%2Fsamba.git selftest: Fix subunit reporting the time incorrectly Although report_time() would output the time in UTC, it neglected to specify the timezone offset. Thus subunithelper.parse_results() would interpret the time string it was given as being in local time. TestProtocolClient.time() then converted that *back* into UTC, giving an incorrect result (unless UTC is your local timezone). Fix this by having report_time() indicate that the time zone is UTC. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15162 Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/selftest/Subunit.pm b/selftest/Subunit.pm index 07f3ac28ddf..581af6246b3 100644 --- a/selftest/Subunit.pm +++ b/selftest/Subunit.pm @@ -55,7 +55,7 @@ sub report_time() if (substr($msg, 1, 1) eq ".") { $msg = "0" . $msg; } - printf "time: %04d-%02d-%02d %02d:%02d:%s\n", $year+1900, $mon+1, $mday, $hour, $min, $msg; + printf "time: %04d-%02d-%02d %02d:%02d:%sZ\n", $year+1900, $mon+1, $mday, $hour, $min, $msg; } sub progress_pop()