From 88ff9362fe44b0feb7d1f4fa490035dc82a2d4e3 Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Wed, 30 Nov 2022 20:15:04 +0000 Subject: [PATCH] Correctly format tztime The format uses an incorrect source string to replate %time placeholder with the corresponding datetime value, as a result we output a format string instead of formatted value --- src/print_time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/print_time.c b/src/print_time.c index 5b57e2d7..8d9b8066 100644 --- a/src/print_time.c +++ b/src/print_time.c @@ -71,7 +71,7 @@ void print_time(time_ctx_t *ctx) { {.name = "%time", .value = string_time}}; const size_t num = sizeof(placeholders) / sizeof(placeholder_t); - char *formatted = format_placeholders(ctx->format_time, &placeholders[0], num); + char *formatted = format_placeholders(ctx->format, &placeholders[0], num); OUTPUT_FORMATTED; free(formatted); }