]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
set the containing sizer to NULL when destroying the sizer; this fixes a crash (don...
[wxWidgets.git] / src / common / utilscmn.cpp
index eefe29c5c971788a5c5a625f21b68e588eaeb2c7..ff9c48807c6c3d026b21ba1be0c0f39a79a26410 100644 (file)
 #include "wx/process.h"
 #include "wx/txtstrm.h"
 
+#if defined(__WXWINCE__) && wxUSE_DATETIME
+#include "wx/datetime.h"
+#endif
+
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
     #include "wx/statusbr.h"
 #endif // wxUSE_GUI
 
+#ifndef __WXWINCE__
 #include <time.h>
+#else
+#include "wx/msw/wince/time.h"
+#endif
 
-#ifndef __MWERKS__
+#if !defined(__MWERKS__) && !defined(__WXWINCE__)
     #include <sys/types.h>
     #include <sys/stat.h>
 #endif
 
-#ifdef __SALFORDC__
-    #include <clib.h>
-#endif
-
 #ifdef __WXMSW__
     #include "wx/msw/private.h"
 #endif
@@ -259,10 +263,19 @@ wxString wxDecToHex(int dec)
 // Return the current date/time
 wxString wxNow()
 {
+#ifdef __WXWINCE__
+#if wxUSE_DATETIME
+    wxDateTime now = wxDateTime::Now();
+    return now.Format();
+#else
+    return wxEmptyString;
+#endif
+#else
     time_t now = time((time_t *) NULL);
     char *date = ctime(&now);
     date[24] = '\0';
     return wxString::FromAscii(date);
+#endif
 }
 
 const wxChar *wxGetInstallPrefix()