X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/713a0efc617935b1da6151d98ff111e3bde52c3d..016105291a38f62a4811025653947cb4f8da765e:/src/common/datetime.cpp diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 23080fef24..7dc3120194 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -102,14 +102,20 @@ #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 + #include 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