Skip to content

Commit

Permalink
fix -Wformat-y2k error
Browse files Browse the repository at this point in the history
%c potentially prints a 2 digit year. Just use a normal format.
  • Loading branch information
neheb authored Jun 8, 2024
1 parent 8f5a87e commit 4c7629f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/iperf_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -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), "%c ", ltm);
strftime(iperf_timestrerr, sizeof(iperf_timestrerr), "%Y-%m-%d %H:%M:%S", ltm);
ct = iperf_timestrerr;
}

Expand Down

0 comments on commit 4c7629f

Please sign in to comment.