From 33838da76c71d2b458529b532b184bb9fe50931e Mon Sep 17 00:00:00 2001 From: "Bruce A. Mah" Date: Thu, 27 Jun 2024 14:06:25 -0700 Subject: [PATCH] Use user-provided timestasmp format string specifier for errors. This change provides consistent behavior relative to more routine (non-error) timestamped output. --- src/iperf_error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iperf_error.c b/src/iperf_error.c index f4172d0d1..ce925a81f 100644 --- a/src/iperf_error.c +++ b/src/iperf_error.c @@ -99,7 +99,7 @@ iperf_errexit(struct iperf_test *test, const char *format, ...) if (test != NULL && test->timestamps) { time(&now); ltm = localtime(&now); - strftime(iperf_timestrerr, sizeof(iperf_timestrerr), "%Y-%m-%d %H:%M:%S", ltm); + strftime(iperf_timestrerr, sizeof(iperf_timestrerr), iperf_get_test_timestamp_format(test), ltm); ct = iperf_timestrerr; }