From: Fabian Keil Date: Sat, 25 Jun 2011 12:39:18 +0000 (+0000) Subject: In get_log_timestamp(), use the ISO 8601 date format %Y-%m-%d. X-Git-Tag: v_3_0_18~206 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=9877d948ac98fd6c2d83d9a07d2811676da78bd9;hp=58842b486231d1910f7d11132f55e805ec333ed4 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. --- 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);