From 21e8fae43d417d2418336d70af762d0e8ccdeab3 Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Sat, 31 Mar 2018 07:14:15 +0000 Subject: [PATCH] fixed the default time format in the log output --- moo/lib/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/moo/lib/main.c b/moo/lib/main.c index 5f1f985..bfc9cb1 100644 --- a/moo/lib/main.c +++ b/moo/lib/main.c @@ -700,8 +700,8 @@ static void log_write (moo_t* moo, unsigned int mask, const moo_ooch_t* msg, moo tslen = strftime (ts, sizeof(ts), "%Y-%m-%d %H:%M:%S ", tmp); /* no timezone info */ if (tslen == 0) { - strcpy (ts, "0000-00-00 00:00:00"); - tslen = 19; + strcpy (ts, "0000-00-00 00:00:00 "); + tslen = 20; } #else tmp = localtime_r (&now, &tm); @@ -712,8 +712,8 @@ static void log_write (moo_t* moo, unsigned int mask, const moo_ooch_t* msg, moo #endif if (tslen == 0) { - strcpy (ts, "0000-00-00 00:00:00 +0000"); - tslen = 25; + strcpy (ts, "0000-00-00 00:00:00 +0000 "); + tslen = 26; } #endif write_log (moo, logfd, ts, tslen);