BUG/MINOR: clock/stats: also use start_time not start_date in HTML info

For an unknown reason in the change of uptime calculation for the HTML
page didn't make it to commit 6093ba47c ("BUG/MINOR: clock: do not mix
wall-clock and monotonic time in uptime calculation"). Let's address it
as well otherwise the stats page will display an incorrect uptime.

No backport needed unless the patch above is backported.
This commit is contained in:
Willy Tarreau 2023-02-10 16:53:35 +01:00
parent 2776e775ec
commit b685ad0774
1 changed files with 1 additions and 1 deletions

View File

@ -3537,7 +3537,7 @@ static void stats_dump_html_info(struct stconn *sc, struct uri_auth *uri)
{
struct appctx *appctx = __sc_appctx(sc);
struct show_stat_ctx *ctx = appctx->svcctx;
unsigned int up = (now.tv_sec - start_date.tv_sec);
unsigned int up = (now.tv_sec - start_time.tv_sec);
char scope_txt[STAT_SCOPE_TXT_MAXLEN + sizeof STAT_SCOPE_PATTERN];
const char *scope_ptr = stats_scope_ptr(appctx, sc);
unsigned long long bps;