X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/44061d3629d516e9548586c6da0f6d368969f85f..c0ae6c3bc40864f4d6312e136ec2f714b9ef239f:/src/common/datetime.cpp diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index c57875ad35..026bae109d 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -172,7 +172,22 @@ wxCUSTOM_TYPE_INFO(wxDateTime, wxToStringConverter , wxFromStringCon #define WX_GMTOFF_IN_TM #elif defined(__WXWINCE__) && defined(__VISUALC8__) // _timezone is not present in dynamic run-time library - #if 1 + #if 0 + // 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 1 + // Solution (2): using GetTimeZoneInformation static long wxGetTimeZone() { static long timezone = MAXLONG; // invalid timezone @@ -186,6 +201,7 @@ wxCUSTOM_TYPE_INFO(wxDateTime, wxToStringConverter , wxFromStringCon } #define WX_TIMEZONE wxGetTimeZone() #else + // Old method using _timezone: this symbol doesn't exist in the dynamic run-time library (i.e. using /MD) #define WX_TIMEZONE _timezone #endif #else // unknown platform - try timezone @@ -3819,7 +3835,7 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date) // some special cases static struct { - const wxChar *str; + const char *str; int dayDiffFromToday; } literalDates[] = { @@ -3994,7 +4010,7 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date) else // not a valid weekday name { // try the ordinals - static const wxChar *ordinals[] = + static const char *ordinals[] = { wxTRANSLATE("first"), wxTRANSLATE("second"), @@ -4160,7 +4176,7 @@ const wxChar *wxDateTime::ParseTime(const wxChar *time) // first try some extra things static const struct { - const wxChar *name; + const char *name; wxDateTime_t hour; } stdTimes[] = {