summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2014-12-12 10:57:37 +1100
committerAmitay Isaacs <amitay@samba.org>2014-12-12 05:02:32 +0100
commit0d0a0f79d387c45e697d9de46ffe5c46a1f39295 (patch)
treeaccdb7c3dd041914da1a88eed8cb162fb6f07c5c /lib
parent3554d88a589c079edea068867601c2d25b966932 (diff)
downloadsamba-0d0a0f79d387c45e697d9de46ffe5c46a1f39295.tar.gz
samba-0d0a0f79d387c45e697d9de46ffe5c46a1f39295.tar.xz
samba-0d0a0f79d387c45e697d9de46ffe5c46a1f39295.zip
lib/util: Fix incorrect month in timestamps
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11003 Reported-by: Youzhong Yang <Youzhong.Yang@mathworks.com> Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Fri Dec 12 05:02:32 CET 2014 on sn-devel-104
Diffstat (limited to 'lib')
-rw-r--r--lib/util/time_basic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util/time_basic.c b/lib/util/time_basic.c
index 0eeb441371..e4b088610b 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))) {