]> git.saurik.com Git - wxWidgets.git/commitdiff
APplied patch [ 1776062 ] wxWinCE 2.8.3 (dynamic) VS 2005 - _timezone problem
authorJulian Smart <julian@anthemion.co.uk>
Tue, 21 Aug 2007 13:30:35 +0000 (13:30 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 21 Aug 2007 13:30:35 +0000 (13:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/datetime.cpp

index 906710008547363daaa90a9febf0e6eadb651763..c57875ad35afc6d591caaa045723bf14e40397b7 100644 (file)
@@ -171,7 +171,23 @@ wxCUSTOM_TYPE_INFO(wxDateTime, wxToStringConverter<wxDateTime> , wxFromStringCon
     #elif defined(__DARWIN__)
         #define WX_GMTOFF_IN_TM
     #elif defined(__WXWINCE__) && defined(__VISUALC8__)
+        // _timezone is not present in dynamic run-time library
+        #if 1
+        static long wxGetTimeZone()
+        {
+            static long timezone = MAXLONG; // invalid timezone
+            if (timezone == MAXLONG)
+            {
+                TIME_ZONE_INFORMATION tzi;
+                ::GetTimeZoneInformation(&tzi);
+                timezone = tzi.Bias;
+            }
+            return timezone;
+        }
+        #define WX_TIMEZONE wxGetTimeZone()
+        #else
         #define WX_TIMEZONE _timezone
+        #endif
     #else // unknown platform - try timezone
         #define WX_TIMEZONE timezone
     #endif