From b13a524d39f89af0d84efaeec9e4bebebe2f2b52 Mon Sep 17 00:00:00 2001 From: freemine Date: Mon, 25 Jan 2021 19:55:26 +0800 Subject: [PATCH] sizeof(time_t) is platform-dependent --- src/plugins/http/src/httpUtil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/http/src/httpUtil.c b/src/plugins/http/src/httpUtil.c index 7f1e2a94d1..abf02232e4 100644 --- a/src/plugins/http/src/httpUtil.c +++ b/src/plugins/http/src/httpUtil.c @@ -37,7 +37,7 @@ void httpTimeToString(time_t t, char *buf, int32_t buflen) { time_t tt = t / 1000; ptm = localtime(&tt); strftime(ts, 31, "%Y-%m-%d %H:%M:%S", ptm); - sprintf(buf, "%s.%03" PRId64, ts, t % 1000); + sprintf(buf, "%s.%03" PRId64, ts, (long long)(t % 1000)); } int32_t httpAddToSqlCmdBuffer(HttpContext *pContext, const char *const format, ...) { -- GitLab