From 9a8c1ee9771e2c7e04788c0f14059f6cbca6bead Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 21 Aug 2007 12:14:26 +0000 Subject: [PATCH] Applied patch [ 1764987 ] fix localtime link error using wm5 SDK git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/datetime.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/wx/datetime.h b/include/wx/datetime.h index 7eccaa1652..1f7074ee04 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -1087,8 +1087,13 @@ public: // another one to get the current time broken down static struct tm *GetTmNow() { +#ifdef __WXWINCE__ + static struct tm l_CurrentTime; + return GetTmNow(&l_CurrentTime); +#else time_t t = GetTimeNow(); return localtime(&t); +#endif } // get current time using thread-safe function