use ResetTime() in Today() instead of dealing with raw struct tm which introduces a bug around DST changes (replaces patch 1097811)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-01-21 01:21:35 +00:00
parent 767d6c83a3
commit cb1ef83399

View File

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