X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5edb3cb52d3f483929a06bb0f69c12947259930c..b5085b02736379c4094d8171dedae24d611fe336:/src/common/datetime.cpp diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 7c4dc7d5af..f69eeb9e92 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -2261,11 +2261,11 @@ wxString wxDateTime::Format(const wxChar *format, const TimeZone& tz) const { wxCHECK_MSG( format, wxEmptyString, _T("NULL format in wxDateTime::Format") ); - time_t time = GetTicks(); - // we have to use our own implementation if the date is out of range of // strftime() or if we use non standard specificators #ifdef HAVE_STRFTIME + time_t time = GetTicks(); + if ( (time != (time_t)-1) && !wxStrstr(format, _T("%l")) ) { // use strftime()