]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/datetime/datetimetest.cpp
moved fatal exception handling code to msw/main.cpp from common code
[wxWidgets.git] / tests / datetime / datetimetest.cpp
index bc68b2f7cc789ca61808c08d6e0525eae789e895..fdfe2982c4480082bc9ef1c3c962f6ee7d3d0b0f 100644 (file)
@@ -11,7 +11,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#include "wx/wxprec.h"
+#include "testprec.h"
 
 #ifdef __BORLANDC__
     #pragma hdrstop
@@ -22,8 +22,6 @@
 
 #include "wx/datetime.h"
 
-#include "wx/cppunit.h"
-
 // ----------------------------------------------------------------------------
 // broken down date representation used for testing
 // ----------------------------------------------------------------------------
@@ -608,6 +606,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 +643,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