[Sheepdog] [PATCH] use 24 hour system instead of 12 hour system

sanjie.cyg at taobao.com sanjie.cyg at taobao.com
Mon Oct 10 11:03:44 CEST 2011


From: Andy chen <andychenzy at gmail.com>

Original log use 12 hour system, but not use time foramt parameter
'%p' to print AM/PM, this patch fix it

Signed-off-by: Andy chen <andychenzy at gmail.com>
---
 lib/logger.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/logger.c b/lib/logger.c
index 15f5055..318b557 100644
--- a/lib/logger.c
+++ b/lib/logger.c
@@ -188,7 +188,7 @@ static int log_enqueue(int prio, const char *func, int line, const char *fmt,
 		t = time(NULL);
 		tmp = localtime(&t);
 
-		strftime(p, MAX_MSG_SIZE, "%b %2d %I:%M:%S ", tmp);
+		strftime(p, MAX_MSG_SIZE, "%b %2d %H:%M:%S ", tmp);
 		p += strlen(p);
 	}
 
-- 
1.7.6.4




More information about the sheepdog mailing list