X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/456639ac872830894e596e99942e282c1ea4293c..f281f29f89a06dffd4a9357623e4d7a247419dc9:/src/common/datetime.cpp?ds=sidebyside diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index caf8b036ce..ba9419b5c7 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -935,7 +935,7 @@ void wxDateTime::GetAmPmStrings(wxString *am, wxString *pm) // assert, even though it is a perfectly legal use. if ( am ) { - if (wxStrftime(buffer, sizeof buffer, _T("%p"), &tm) > 0) + if (wxStrftime(buffer, sizeof(buffer)/sizeof(wxChar), _T("%p"), &tm) > 0) *am = wxString(buffer); else *am = wxString(); @@ -943,7 +943,7 @@ void wxDateTime::GetAmPmStrings(wxString *am, wxString *pm) if ( pm ) { tm.tm_hour = 13; - if (wxStrftime(buffer, sizeof buffer, _T("%p"), &tm) > 0) + if (wxStrftime(buffer, sizeof(buffer)/sizeof(wxChar), _T("%p"), &tm) > 0) *pm = wxString(buffer); else *pm = wxString(); @@ -2844,7 +2844,11 @@ void GetLocaleDateFormat(wxString *fmt) // done using wxLocale, in which case thread's current locale is also // set to correct LCID value and we can use GetLocaleInfo to determine // the correct formatting string: +#ifdef __WXWINCE__ + LCID lcid = LOCALE_USER_DEFAULT; +#else LCID lcid = GetThreadLocale(); +#endif wxChar delim[5]; // fields deliminer, 4 chars max if ( GetLocaleInfo(lcid, LOCALE_SDATE, delim, 5) ) {