diff --git a/src/util-time.c b/src/util-time.c index 4509625bc2..8da993739d 100644 --- a/src/util-time.c +++ b/src/util-time.c @@ -222,8 +222,9 @@ void CreateIsoTimeString (const struct timeval *ts, char *str, size_t size) WinStrftime(ts, t, str, size); #else char time_fmt[64] = { 0 }; - strftime(time_fmt, sizeof(time_fmt), "%Y-%m-%dT%H:%M:%S.%%06u%z", t); - snprintf(str, size, time_fmt, ts->tv_usec); + int64_t usec = ts->tv_usec; + strftime(time_fmt, sizeof(time_fmt), "%Y-%m-%dT%H:%M:%S.%%06" PRIi64 "%z", t); + snprintf(str, size, time_fmt, usec); #endif } else { snprintf(str, size, "ts-error");