]> git.saurik.com Git - wxWidgets.git/commitdiff
return the beginning/end of DST in local time, not UTC, for consistency with the...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 30 Sep 2007 19:27:23 +0000 (19:27 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 30 Sep 2007 19:27:23 +0000 (19:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/datetime.cpp
tests/datetime/datetimetest.cpp

index 06dd58caa62500c1f55b707509738d5781ae2889..087db34e896d60791daf945c9aa7df13c3c86435 100644 (file)
@@ -1231,9 +1231,6 @@ wxDateTime wxDateTime::GetBeginDST(int year, Country country)
         }
 
         dt += wxTimeSpan::Hours(1);
-
-        // disable DST tests because it could result in an infinite recursion!
-        dt.MakeGMT(true);
     }
     else switch ( country )
     {
@@ -1332,9 +1329,6 @@ wxDateTime wxDateTime::GetEndDST(int year, Country country)
         }
 
         dt += wxTimeSpan::Hours(1);
-
-        // disable DST tests because it could result in an infinite recursion!
-        dt.MakeGMT(true);
     }
     else switch ( country )
     {
index f2a0d60016866cb73230909520741ea8822da1c9..69452d8d0833bb6f838e8495a1f10dee1e2bd28f 100644 (file)
@@ -858,7 +858,7 @@ void DateTimeTestCase::TestDSTBug()
     CPPUNIT_ASSERT_EQUAL(31, (int)dt.GetDay());
     CPPUNIT_ASSERT_EQUAL(wxDateTime::Oct, dt.GetMonth());
     CPPUNIT_ASSERT_EQUAL(2004, (int)dt.GetYear());
-    CPPUNIT_ASSERT_EQUAL(2, (int)dt.GetHour());
+    CPPUNIT_ASSERT_EQUAL(1, (int)dt.GetHour());
     CPPUNIT_ASSERT_EQUAL(0, (int)dt.GetMinute());
     CPPUNIT_ASSERT_EQUAL(0, (int)dt.GetSecond());
     CPPUNIT_ASSERT_EQUAL(0, (int)dt.GetMillisecond());