From 0b5873798dc8d4b46f81db3e130e0ca90e929e18 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Thu, 4 Dec 2008 16:27:05 +0000 Subject: [PATCH] win32: tm_mon fix for localtime() (Hiroshi Saito) --- win32/win32support.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 2.40.0