Also remove wxUSE_DATETIME guard, wxLocaltime_r() is available even without
wxUSE_DATETIME.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69847
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include <wtime.h>
#endif
#include <wtime.h>
#endif
-#include "wx/datetime.h"
// the suffix we add to the button to show that the dialog can be expanded
#define EXPAND_SUFFIX wxT(" >>")
// the suffix we add to the button to show that the dialog can be expanded
#define EXPAND_SUFFIX wxT(" >>")
// allows to exclude the usage of wxDateTime
static wxString TimeStamp(const wxString& format, time_t t)
{
// allows to exclude the usage of wxDateTime
static wxString TimeStamp(const wxString& format, time_t t)
{
wxChar buf[4096];
struct tm tm;
if ( !wxStrftime(buf, WXSIZEOF(buf), format, wxLocaltime_r(&t, &tm)) )
wxChar buf[4096];
struct tm tm;
if ( !wxStrftime(buf, WXSIZEOF(buf), format, wxLocaltime_r(&t, &tm)) )
wxFAIL_MSG(wxT("strftime() failed"));
}
return wxString(buf);
wxFAIL_MSG(wxT("strftime() failed"));
}
return wxString(buf);
-#else // !wxUSE_DATETIME
- return wxEmptyString;
-#endif // wxUSE_DATETIME/!wxUSE_DATETIME