mirror of
https://github.com/apache/nuttx.git
synced 2026-09-21 13:25:12 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user