From b317b3e1114e93f5133429a64de82a4e865939f7 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sat, 28 Aug 2021 17:46:26 +0200 Subject: use ISO 8609 / RFC 3339 timestamps for logging --- src/util/common_logging.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/common_logging.c b/src/util/common_logging.c index 48cc6fe3b..cba37cd2f 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c @@ -1014,8 +1014,10 @@ mylog (enum GNUNET_ErrorType kind, } else { - if (0 == strftime (date2, DATE_STR_SIZE, "%b %d %H:%M:%S-%%06u", tmptr)) + /* RFC 3339 timestamp, with snprintf placeholder for microseconds */ + if (0 == strftime (date2, DATE_STR_SIZE, "%Y-%m-%dT%H:%M:%S.%%06u%z", tmptr)) abort (); + /* Fill in microseconds */ if (0 > snprintf (date, sizeof(date), date2, timeofday.tv_usec)) abort (); } -- cgit v1.2.3