]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/datetime.cpp
wxTheColourDatabase->Find() can fail.
[wxWidgets.git] / src / common / datetime.cpp
index 37b1864e219a211df9edc6f3f08ee02385ce0e7d..1873b018468006777a0ecab19d90a0c72ac7d19e 100644 (file)
@@ -337,17 +337,16 @@ static int GetTimeZone()
         // just call wxLocaltime_r() instead of figuring out whether this
         // system supports tzset(), _tzset() or something else
         time_t t = 0;
-        struct tm *tm;
-        struct tm tmstruct;
+        struct tm tm;
 
-        tm = wxLocaltime_r(&t, &tmstruct);
+        wxLocaltime_r(&t, &tm);
         s_timezoneSet = true;
 
 #ifdef WX_GMTOFF_IN_TM
         // note that GMT offset is the opposite of time zone and so to return
         // consistent results in both WX_GMTOFF_IN_TM and !WX_GMTOFF_IN_TM
         // cases we have to negate it
-        gmtoffset = -tm->tm_gmtoff;
+        gmtoffset = -tm.tm_gmtoff;
 #else // !WX_GMTOFF_IN_TM
         gmtoffset = WX_TIMEZONE;
 #endif // WX_GMTOFF_IN_TM/!WX_GMTOFF_IN_TM