From 0d0a0f79d387c45e697d9de46ffe5c46a1f39295 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 12 Dec 2014 10:57:37 +1100 Subject: [PATCH] lib/util: Fix incorrect month in timestamps BUG: https://bugzilla.samba.org/show_bug.cgi?id=11003 Reported-by: Youzhong Yang Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Dec 12 05:02:32 CET 2014 on sn-devel-104 --- lib/util/time_basic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util/time_basic.c b/lib/util/time_basic.c index 0eeb4413717..e4b088610b7 100644 --- a/lib/util/time_basic.c +++ b/lib/util/time_basic.c @@ -66,7 +66,7 @@ char *timeval_str_buf(const struct timeval *tp, bool rfc5424, bool hires, (rfc5424 ? "%04d-%02d-%02dT%02d:%02d:%02d" : "%04d/%02d/%02d %02d:%02d:%02d"), - 1900 + tm->tm_year, tm->tm_mon, tm->tm_mday, + 1900 + tm->tm_year, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); if ((rfc5424 || hires) && (len < sizeof(dst->buf))) {