]> git.saurik.com Git - wxWidgets.git/commitdiff
don't use the return result of wxLocaltime_r, we receive the output in second paramet...
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 18 Apr 2006 22:28:02 +0000 (22:28 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 18 Apr 2006 22:28:02 +0000 (22:28 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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