Take time into account in wxDateTime <-> SYSTEMTIME conversion.
wxDateTime::SetFromMSWSysTime() and GetAsMSWSysTime() worked with the date part of SYSTEMTIME only, do use time part as well now. Closes #11176. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -412,6 +412,7 @@ MSW:
|
||||
- Fix wxMDIChildFrame::SetSize() (Lars Rosenboom).
|
||||
- Fix wxTreeCtrl::UnselectItem() in single selection controls.
|
||||
- Allow customizing wxStandardPaths logic for program directory determination.
|
||||
- Use time in wxDateTime <-> SYSTEMTIME conversion (troelsk).
|
||||
|
||||
i18n:
|
||||
|
||||
|
@@ -2356,7 +2356,7 @@ wxDateTime& wxDateTime::SetFromMSWSysTime(const SYSTEMTIME& st)
|
||||
return Set(st.wDay,
|
||||
static_cast<wxDateTime::Month>(wxDateTime::Jan + st.wMonth - 1),
|
||||
st.wYear,
|
||||
0, 0, 0);
|
||||
st.wHour, st.wMinute, st.wSecond, st.wMilliseconds);
|
||||
}
|
||||
|
||||
void wxDateTime::GetAsMSWSysTime(SYSTEMTIME* st) const
|
||||
@@ -2367,11 +2367,11 @@ void wxDateTime::GetAsMSWSysTime(SYSTEMTIME* st) const
|
||||
st->wMonth = (WXWORD)(tm.mon - wxDateTime::Jan + 1);
|
||||
st->wDay = tm.mday;
|
||||
|
||||
st->wDayOfWeek =
|
||||
st->wHour =
|
||||
st->wMinute =
|
||||
st->wSecond =
|
||||
st->wMilliseconds = 0;
|
||||
st->wDayOfWeek = 0;
|
||||
st->wHour = tm.hour;
|
||||
st->wMinute = tm.min;
|
||||
st->wSecond = tm.sec;
|
||||
st->wMilliseconds = tm.msec;
|
||||
}
|
||||
#endif // __WXMSW__
|
||||
|
||||
|
Reference in New Issue
Block a user