-#elif defined(WX_TIMEZONE) // If WX_TIMEZONE was defined by configure, use it.
- return WX_TIMEZONE;
-#elif defined(__BORLANDC__) || defined(__MINGW32__) || defined(__VISAGECPP__)
- return _timezone;
-#elif defined(__MWERKS__)
- return 28800;
-#else // unknown platform -- assume it has timezone
- return timezone;
-#endif // WX_GMTOFF_IN_TM/!WX_GMTOFF_IN_TM
+#else // Use some kind of time zone variable.
+ // In any case we must initialize the time zone before using it.
+ tzset();
+
+ #if defined(WX_TIMEZONE) // If WX_TIMEZONE was defined by configure, use it.
+ return WX_TIMEZONE;
+ #elif defined(__BORLANDC__) || defined(__MINGW32__) || defined(__VISAGECPP__)
+ return _timezone;
+ #else // unknown platform -- assume it has timezone
+ return timezone;
+ #endif // different time zone variables
+#endif // different ways to determine time zone