]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/datetime.cpp
removed obsolete docs
[wxWidgets.git] / src / common / datetime.cpp
index 23080fef24752804d61d316ba2f21cd7ea130159..7dc31201942b12699377b48881284bbecb86462c 100644 (file)
         #define WX_TIMEZONE _timezone
     #elif defined(__MWERKS__)
         long wxmw_timezone = 28800;
-        #define WX_TIMEZONE wxmw_timezone;
+        #define WX_TIMEZONE wxmw_timezone
     #elif defined(__DJGPP__)
         #include <sys/timeb.h>
+        #include <values.h>
         static long wxGetTimeZone()
         {
-            struct timeb tb;
-            ftime(&tb);
-            return tb.timezone;
+            static long timezone = MAXLONG; // invalid timezone
+            if (timezone == MAXLONG)
+            {
+                struct timeb tb;
+                ftime(&tb);
+                timezone = tb.timezone;
+            }
+            return timezone;
         }
         #define WX_TIMEZONE wxGetTimeZone()
     #else // unknown platform - try timezone