]> git.saurik.com Git - wxWidgets.git/commitdiff
use ResetTime() in Today() instead of dealing with raw struct tm which introduces...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 21 Jan 2005 01:21:35 +0000 (01:21 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 21 Jan 2005 01:21:35 +0000 (01:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/datetime.h

index bf85baa01bf6e60ccdc3641bd8bd3d6a9c740d26..c40a90ee8c58508597a03f499e541c3775dc6279 100644 (file)
@@ -1400,12 +1400,10 @@ inline wxDateTime wxDateTime::Now()
 /* static */
 inline wxDateTime wxDateTime::Today()
 {
-    struct tm *time = GetTmNow();
-    time->tm_hour = 0;
-    time->tm_min = 0;
-    time->tm_sec = 0;
+    wxDateTime dt(Now());
+    dt.ResetTime();
 
-    return wxDateTime(*time);
+    return dt;
 }
 
 #if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400))