From 4ac5c1892361894dd879b763453a9e7dc31858d3 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sun, 4 Feb 2018 10:47:06 +0100 Subject: [PATCH] Use strftime instead of obsolete asctime function --- stats.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stats.c b/stats.c index de206fe00..5ac56fdc2 100644 --- a/stats.c +++ b/stats.c @@ -474,7 +474,9 @@ stats_summary(struct conf *conf) secondary_config_path ? secondary_config_path : ""); if (oldest) { struct tm *tm = localtime(&oldest); - printf("stats zero time %s", asctime(tm)); + char timestamp[100]; + strftime(timestamp, sizeof(timestamp), "%c", tm); + printf("stats zero time %s\n", timestamp); } // ...and display them. -- 2.47.2