fixed bug in Set() on DST days (patch 1097811)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1213,6 +1213,12 @@ wxDateTime& wxDateTime::Set(wxDateTime_t hour,
|
||||
tm->tm_min = minute;
|
||||
tm->tm_sec = second;
|
||||
|
||||
// and the DST in case it changes on this date
|
||||
struct tm tm2(*tm);
|
||||
mktime(&tm2);
|
||||
if ( tm2.tm_isdst != tm->tm_isdst )
|
||||
tm->tm_isdst = tm2.tm_isdst;
|
||||
|
||||
(void)Set(*tm);
|
||||
|
||||
// and finally adjust milliseconds
|
||||
|
Reference in New Issue
Block a user