]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Use strftime instead of obsolete asctime function
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 4 Feb 2018 09:47:06 +0000 (10:47 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 4 Feb 2018 09:47:06 +0000 (10:47 +0100)
stats.c

diff --git a/stats.c b/stats.c
index de206fe00fa8e0379570daeaf693d3ab3683ee1d..5ac56fdc229aff2d5bd4a27abcbb07cea92f9b36 100644 (file)
--- 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.