From: Willy Tarreau Date: Thu, 27 Apr 2023 16:22:34 +0000 (+0200) Subject: BUG/MINOR: trace: show wall-clock date, not internal date in show activity X-Git-Tag: v2.8-dev9~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc3c4e85f04327736616cabda1f7eaa1ea62f471;p=thirdparty%2Fhaproxy.git BUG/MINOR: trace: show wall-clock date, not internal date in show activity Yet another case where "now" was used instead of "date" for a publicly visible date that was already incorrect and became worse after commit 28360dc ("MEDIUM: clock: force internal time to wrap early after boot"). No backport is needed. --- diff --git a/src/flt_trace.c b/src/flt_trace.c index 5aabcb2b09..bbadfe24cd 100644 --- a/src/flt_trace.c +++ b/src/flt_trace.c @@ -43,7 +43,7 @@ struct trace_config { do { \ if (!(conf->flags & TRACE_F_QUIET)) \ fprintf(stderr, "%d.%06d [%-20s] " fmt "\n", \ - (int)now.tv_sec, (int)now.tv_usec, (conf)->name,\ + (int)date.tv_sec, (int)date.tv_usec, (conf)->name,\ ##__VA_ARGS__); \ } while (0) @@ -51,7 +51,7 @@ struct trace_config { do { \ if (!(conf->flags & TRACE_F_QUIET)) \ fprintf(stderr, "%d.%06d [%-20s] [strm %p(%x) 0x%08x 0x%08x] " fmt "\n", \ - (int)now.tv_sec, (int)now.tv_usec, (conf)->name, \ + (int)date.tv_sec, (int)date.tv_usec, (conf)->name, \ strm, (strm ? ((struct stream *)strm)->uniq_id : ~0U), \ (strm ? strm->req.analysers : 0), (strm ? strm->res.analysers : 0), \ ##__VA_ARGS__); \