fix datetime tests for non-westeurope time zones
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -608,6 +608,10 @@ void DateTimeTestCase::TestTimeTicks()
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
wxDateTime dt = d.DT();
|
wxDateTime dt = d.DT();
|
||||||
|
//RN: Translate according to test's time zone
|
||||||
|
//2nd param is to ignore DST - it's already factored
|
||||||
|
//into Vadim's tests
|
||||||
|
dt.MakeTimezone(wxDateTime::WEST, true);
|
||||||
long ticks = (dt.GetValue() / 1000).ToLong();
|
long ticks = (dt.GetValue() / 1000).ToLong();
|
||||||
CPPUNIT_ASSERT( ticks == d.ticks );
|
CPPUNIT_ASSERT( ticks == d.ticks );
|
||||||
|
|
||||||
@@ -641,6 +645,9 @@ void DateTimeTestCase::TestTimeParse()
|
|||||||
CPPUNIT_ASSERT( parseTestDates[n].good );
|
CPPUNIT_ASSERT( parseTestDates[n].good );
|
||||||
|
|
||||||
wxDateTime dtReal = parseTestDates[n].date.DT();
|
wxDateTime dtReal = parseTestDates[n].date.DT();
|
||||||
|
//RN: We need this because the tests are based on
|
||||||
|
//a non-GMT time zone
|
||||||
|
dtReal.MakeTimezone(wxDateTime::WEST, true);
|
||||||
CPPUNIT_ASSERT( dt == dtReal );
|
CPPUNIT_ASSERT( dt == dtReal );
|
||||||
}
|
}
|
||||||
else // failed to parse
|
else // failed to parse
|
||||||
|
Reference in New Issue
Block a user