From 4dd042d00bcd8817695e6d5ebc4ea6d88748cce3 Mon Sep 17 00:00:00 2001 From: "Tim Kan(SSS)" Date: Tue, 21 Jan 2025 16:44:55 +0800 Subject: [PATCH] fix(libc): lib_strftime %F month number off-by-one Corrects the month number output for the %F format specifier in lib_strftime. --- libs/libc/time/lib_strftime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/libc/time/lib_strftime.c b/libs/libc/time/lib_strftime.c index ddb64663a36..86615dfd7e2 100644 --- a/libs/libc/time/lib_strftime.c +++ b/libs/libc/time/lib_strftime.c @@ -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;