util: correct off-by-one in month display

This commit is contained in:
Jeff Garzik 2011-04-11 17:32:25 -04:00 committed by Jeff Garzik
parent a9a2840d81
commit 7ff1280bbb

2
util.c
View file

@ -80,7 +80,7 @@ void applog(int prio, const char *fmt, ...)
f = alloca(len); f = alloca(len);
sprintf(f, "[%d-%02d-%02d %02d:%02d:%02d] %s\n", sprintf(f, "[%d-%02d-%02d %02d:%02d:%02d] %s\n",
tm.tm_year + 1900, tm.tm_year + 1900,
tm.tm_mon, tm.tm_mon + 1,
tm.tm_mday, tm.tm_mday,
tm.tm_hour, tm.tm_hour,
tm.tm_min, tm.tm_min,