]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: trace: show wall-clock date, not internal date in show activity
authorWilly Tarreau <w@1wt.eu>
Thu, 27 Apr 2023 16:22:34 +0000 (18:22 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 27 Apr 2023 16:22:34 +0000 (18:22 +0200)
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

index 5aabcb2b097e694891f76437390f488a3415e2f1..bbadfe24cdd23eb9fb7bf7cdd510e069d82a61ab 100644 (file)
@@ -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__);                                                         \