]> git.saurik.com Git - wxWidgets.git/commitdiff
fix datetime tests for non-westeurope time zones
authorRyan Norton <wxprojects@comcast.net>
Wed, 10 Nov 2004 09:31:13 +0000 (09:31 +0000)
committerRyan Norton <wxprojects@comcast.net>
Wed, 10 Nov 2004 09:31:13 +0000 (09:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/datetime/datetimetest.cpp

index bc68b2f7cc789ca61808c08d6e0525eae789e895..cc6f0810847b65b72390b4b088c5b0b9a19e4116 100644 (file)
@@ -608,6 +608,10 @@ void DateTimeTestCase::TestTimeTicks()
             continue;
 
         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();
         CPPUNIT_ASSERT( ticks == d.ticks );
 
@@ -641,6 +645,9 @@ void DateTimeTestCase::TestTimeParse()
             CPPUNIT_ASSERT( parseTestDates[n].good );
 
             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 );
         }
         else // failed to parse