]> git.saurik.com Git - wxWidgets.git/commitdiff
Include wx/time.h to get wxLocaltime_r() declaration, not wx/datetime.h.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 27 Nov 2011 20:28:45 +0000 (20:28 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 27 Nov 2011 20:28:45 +0000 (20:28 +0000)
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

src/generic/logg.cpp

index 665f53dee2db29f6c1f5289eec0f35958dda0b61..f03ba5cc39b6bf067e7796680029c9feb2788db2 100644 (file)
@@ -73,7 +73,7 @@
     #include <wtime.h>
 #endif
 
-#include "wx/datetime.h"
+#include "wx/time.h"
 
 // the suffix we add to the button to show that the dialog can be expanded
 #define EXPAND_SUFFIX wxT(" >>")
@@ -90,7 +90,6 @@
 // allows to exclude the usage of wxDateTime
 static wxString TimeStamp(const wxString& format, time_t t)
 {
-#if wxUSE_DATETIME
     wxChar buf[4096];
     struct tm tm;
     if ( !wxStrftime(buf, WXSIZEOF(buf), format, wxLocaltime_r(&t, &tm)) )
@@ -99,9 +98,6 @@ static wxString TimeStamp(const wxString& format, time_t t)
         wxFAIL_MSG(wxT("strftime() failed"));
     }
     return wxString(buf);
-#else // !wxUSE_DATETIME
-    return wxEmptyString;
-#endif // wxUSE_DATETIME/!wxUSE_DATETIME
 }