Skip to content

Commit

Permalink
DateTime (Windows): fix day-pretty output in custom format
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Feb 20, 2025
1 parent 1047d1c commit d463853
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/datetime/datetime.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d463853

Please sign in to comment.