| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | From 4c7629f590bb18855e478a826833adb05d2a128b Mon Sep 17 00:00:00 2001 |
| 2 | From: Rosen Penev <rosenp@gmail.com> |
| 3 | Date: Sat, 8 Jun 2024 15:35:47 -0700 |
| 4 | Subject: [PATCH] fix -Wformat-y2k error |
| 5 | |
| 6 | %c potentially prints a 2 digit year. Just use a normal format. |
| 7 | --- |
| 8 | src/iperf_error.c | 2 +- |
| 9 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 10 | |
| 11 | --- a/src/iperf_error.c |
| 12 | +++ b/src/iperf_error.c |
| 13 | @@ -99,7 +99,7 @@ iperf_errexit(struct iperf_test *test, c |
| 14 | if (test != NULL && test->timestamps) { |
| 15 | time(&now); |
| 16 | ltm = localtime(&now); |
| 17 | - strftime(iperf_timestrerr, sizeof(iperf_timestrerr), "%c ", ltm); |
| 18 | + strftime(iperf_timestrerr, sizeof(iperf_timestrerr), "%Y-%m-%d %H:%M:%S", ltm); |
| 19 | ct = iperf_timestrerr; |
| 20 | } |
| 21 | |