]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10092 logging: fix strftime for Windows
authorHoward Chu <hyc@openldap.org>
Fri, 29 Sep 2023 12:43:08 +0000 (13:43 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 16 Nov 2023 18:47:34 +0000 (18:47 +0000)
Although %T is standard and documented in M$ docs, it actually doesn't work in MSVCRT.

servers/slapd/logging.c

index f66213d6d9fc9b279d8071e514b4d8c77c39db3e..5d96e247d5bef6069f210ff05b90aaadfbf9515d 100644 (file)
@@ -151,7 +151,7 @@ slap_debug_print( const char *data )
                        ptr = syslog_prefix;
 #endif
                        strftime( ptr, sizeof( SYSLOG_STAMP ),
-                               "%b %d %T", &tm );
+                               "%b %d %H:%M:%S", &tm );
                        ptr[ sizeof( SYSLOG_STAMP )-1 ] = ' ';
 #ifdef _WIN32
                        len = datalen + splen;