fixed bug in Set(double jdn): don't test whether the date is valid before setting it (closes 1158535)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
58385af016
commit
4f0436e465
@ -1386,6 +1386,8 @@ wxDateTime& wxDateTime::Set(double jdn)
|
||||
|
||||
jdn *= MILLISECONDS_PER_DAY;
|
||||
|
||||
m_time.Assign(jdn);
|
||||
|
||||
// JDNs always suppose an UTC date, so bring it back to local time zone
|
||||
// (also see GetJulianDayNumber() implementation)
|
||||
long tzDiff = GetTimeZone();
|
||||
@ -1395,9 +1397,7 @@ wxDateTime& wxDateTime::Set(double jdn)
|
||||
tzDiff -= 3600;
|
||||
}
|
||||
|
||||
jdn += tzDiff*1000; // tzDiff is in seconds
|
||||
|
||||
m_time.Assign(jdn);
|
||||
m_time += tzDiff*1000; // tzDiff is in seconds
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user