From d463853aeb57301da2c0483213918649210ea993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 20 Feb 2025 19:47:27 +0800 Subject: [PATCH] DateTime (Windows): fix day-pretty output in custom format --- src/modules/datetime/datetime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/datetime/datetime.c b/src/modules/datetime/datetime.c index 09c62e7a4e..a5b4b06ce7 100644 --- a/src/modules/datetime/datetime.c +++ b/src/modules/datetime/datetime.c @@ -54,7 +54,7 @@ void ffPrintDateTimeFormat(struct tm* tm, const FFModuleArgs* moduleArgs) result.dayInYear = (uint8_t) (tm->tm_yday + 1); result.dayInMonth = (uint8_t) tm->tm_mday; result.dayInWeek = tm->tm_wday == 0 ? 7 : (uint8_t) tm->tm_wday; - strftime(result.dayPretty, sizeof(result.dayPretty), "%0d", tm); + strftime(result.dayPretty, sizeof(result.dayPretty), "%d", tm); result.hour = (uint8_t) tm->tm_hour; strftime(result.hourPretty, sizeof(result.hourPretty), "%H", tm); result.hour12 = (uint8_t) (result.hour % 12);