diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 87efda6f59..601e4f4356 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -172,6 +172,21 @@ wxCUSTOM_TYPE_INFO(wxDateTime, wxToStringConverter , wxFromStringCon #elif defined(__WXWINCE__) && defined(__VISUALC8__) // _timezone is not present in dynamic run-time library #if 1 + // Solution (1): use the function equivalent of _timezone + static long wxGetTimeZone() + { + static long s_Timezone = MAXLONG; // invalid timezone + if (s_Timezone == MAXLONG) + { + int t; + _get_timezone(& t); + s_Timezone = (long) t; + } + return s_Timezone; + } + #define WX_TIMEZONE wxGetTimeZone() + #elif 0 + // Solution (2): using GetTimeZoneInformation static long wxGetTimeZone() { static long timezone = MAXLONG; // invalid timezone @@ -184,8 +199,6 @@ wxCUSTOM_TYPE_INFO(wxDateTime, wxToStringConverter , wxFromStringCon return timezone; } #define WX_TIMEZONE wxGetTimeZone() - #else - #define WX_TIMEZONE _timezone #endif #else // unknown platform - try timezone #define WX_TIMEZONE timezone