Use correct format for strftime().

This commit is contained in:
Joris Vink 2021-09-13 22:54:05 +02:00
parent 983f5a03f5
commit 824d6421d5
1 changed files with 2 additions and 2 deletions

View File

@ -149,8 +149,8 @@ log_print(int prio, const char *fmt, ...)
time(&now);
t = localtime(&now);
if (strftime(tbuf, sizeof(tbuf), "%y-%m-%d %H:%S:%M", t) > 0)
fprintf(fp, "%s ", tbuf);
if (strftime(tbuf, sizeof(tbuf), "%y-%m-%d %H:%M:%S", t) > 0)
fprintf(fp, "[%ld] %s ", now, tbuf);
vfprintf(fp, fmt, args);
fflush(fp);