From bc3c4e85f04327736616cabda1f7eaa1ea62f471 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 27 Apr 2023 18:22:34 +0200 Subject: [PATCH] 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. --- src/flt_trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flt_trace.c b/src/flt_trace.c index 5aabcb2b0..bbadfe24c 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__); \