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:
@@ -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))
|
||||
|
Reference in New Issue
Block a user