diff --git a/source/util/src/tlog.c b/source/util/src/tlog.c index 5eacf561aa..c6c869fb23 100644 --- a/source/util/src/tlog.c +++ b/source/util/src/tlog.c @@ -150,7 +150,7 @@ static void getDay(char* buf){ time_t t = taosTime(NULL); struct tm tmInfo; if (taosLocalTime(&t, &tmInfo, buf) != NULL) { - (void)strftime(buf, sizeof(buf), "%Y-%m-%d", &tmInfo); + (void)strftime(buf, LOG_FILE_DAY_LEN, "%Y-%m-%d", &tmInfo); } } static void getFullPathName(char* fullName, const char* logName){