fix(libc): lib_strftime %F month number off-by-one

Corrects the month number output for the %F format specifier in lib_strftime.
This commit is contained in:
Tim Kan(SSS) 2025-01-21 16:44:55 +08:00 committed by Xiang Xiao
parent 1fb09dbb7f
commit 4dd042d00b

View file

@ -402,7 +402,7 @@ process_next:
case 'F':
{
len = snprintf(dest, chleft, "%04d-%02d-%02d",
tm->tm_year + TM_YEAR_BASE, tm->tm_mon,
tm->tm_year + TM_YEAR_BASE, tm->tm_mon + 1,
tm->tm_mday);
}
break;