diff --git a/contrib/win32/win32compat/w32log.c b/contrib/win32/win32compat/w32log.c index ae5fd401c..32ca8a510 100644 --- a/contrib/win32/win32compat/w32log.c +++ b/contrib/win32/win32compat/w32log.c @@ -98,8 +98,8 @@ syslog(int priority, const char *format, const char *formatBuffer) return; GetLocalTime(&st); - r = _snprintf_s(msgbufTimestamp, sizeof(msgbufTimestamp), _TRUNCATE, "%d %02d:%02d:%02d:%03d %s\n", - GetCurrentProcessId(), st.wHour, st.wMinute, st.wSecond, + r = _snprintf_s(msgbufTimestamp, sizeof(msgbufTimestamp), _TRUNCATE, "%d %02d/%02d/%04d %02d:%02d:%02d:%03d %s\n", + GetCurrentProcessId(), st.wMonth, st.wDay, st.wYear, st.wHour, st.wMinute, st.wSecond, st.wMilliseconds, formatBuffer); if (r == -1) { _write(logfd, "_snprintf_s failed.", 30);