From 9877d948ac98fd6c2d83d9a07d2811676da78bd9 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 25 Jun 2011 12:39:18 +0000 Subject: [PATCH] In get_log_timestamp(), use the ISO 8601 date format %Y-%m-%d. It's only slightly longer than the old format, but contains the full date including the year and allows sorting by date (when grepping in multiple log files) without hassle. --- errlog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/errlog.c b/errlog.c index d73bbbfc..416b87d4 100644 --- a/errlog.c +++ b/errlog.c @@ -1,4 +1,4 @@ -const char errlog_rcs[] = "$Id: errlog.c,v 1.109 2010/07/26 11:30:09 fabiankeil Exp $"; +const char errlog_rcs[] = "$Id: errlog.c,v 1.110 2010/07/26 12:11:51 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/errlog.c,v $ @@ -450,7 +450,7 @@ static inline size_t get_log_timestamp(char *buffer, size_t buffer_size) tm_now = *localtime(&now); #endif - length = strftime(buffer, buffer_size, "%b %d %H:%M:%S", &tm_now); + length = strftime(buffer, buffer_size, "%Y-%m-%d %H:%M:%S", &tm_now); if (length > (size_t)0) { msecs_length = snprintf(buffer+length, buffer_size - length, ".%.3ld", msecs); -- 2.39.2