From: Marko Kreen Date: Thu, 4 Dec 2008 16:27:05 +0000 (+0000) Subject: win32: tm_mon fix for localtime() (Hiroshi Saito) X-Git-Tag: pgbouncer_1_3_rc1~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0b5873798dc8d4b46f81db3e130e0ca90e929e18;p=pgbouncer win32: tm_mon fix for localtime() (Hiroshi Saito) --- diff --git a/win32/win32support.h b/win32/win32support.h index 67dbc32..df00460 100644 --- a/win32/win32support.h +++ b/win32/win32support.h @@ -241,7 +241,10 @@ static inline const struct passwd * getpwnam(const char *u) { return NULL; } /* fix localtime */ static inline struct tm *w_localtime(const time_t *timep) { struct tm *res = localtime(timep); - if (res) res->tm_year += 1900; + if (res) { + res->tm_year += 1900; + res->tm_mon += 1; + } return res; } #define localtime(a) w_localtime(a)