]> granicus.if.org Git - pgbouncer/commitdiff
win32: tm_mon fix for localtime() (Hiroshi Saito)
authorMarko Kreen <markokr@gmail.com>
Thu, 4 Dec 2008 16:27:05 +0000 (16:27 +0000)
committerMarko Kreen <markokr@gmail.com>
Thu, 4 Dec 2008 16:27:05 +0000 (16:27 +0000)
win32/win32support.h

index 67dbc32c37721bd31888068cdb39756d2ad9070b..df00460e7b3ede5c71253158967d5aacf8014ce2 100644 (file)
@@ -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)