From: Joel Rosdahl Date: Sun, 4 Feb 2018 09:47:06 +0000 (+0100) Subject: Use strftime instead of obsolete asctime function X-Git-Tag: v3.4~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ac5c1892361894dd879b763453a9e7dc31858d3;p=thirdparty%2Fccache.git Use strftime instead of obsolete asctime function --- 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.