1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

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
This commit is contained in:
Martin Schwenke 2014-12-12 10:57:37 +11:00 committed by Amitay Isaacs
parent 3554d88a58
commit 0d0a0f79d3

View File

@ -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))) {