build fix (part of r59673, r59656)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2009-03-20 21:42:43 +00:00
parent cac1cfce37
commit 48fd6e9dd7
3 changed files with 43 additions and 33 deletions

View File

@@ -1183,12 +1183,13 @@ wxDateTime::ParseFormat(const wxString& date,
case _T('c'): // locale default date and time representation
{
wxDateTime dt;
tm tm;
const wxString inc(input);
// NOTE: %c is locale-dependent; try strptime
#ifdef HAVE_STRPTIME
struct tm tm;
// try using strptime() -- it may fail even if the input is
// correct but the date is out of range, so we will fall back
// to our generic code anyhow