From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Sun, 30 Sep 2007 19:27:23 +0000 (+0000)
Subject: return the beginning/end of DST in local time, not UTC, for consistency with the... 
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/770882a69e30385237f89d467972775199e4f546?ds=sidebyside

return the beginning/end of DST in local time, not UTC, for consistency with the other methods; fixed the test

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp
index 06dd58caa6..087db34e89 100644
--- a/src/common/datetime.cpp
+++ b/src/common/datetime.cpp
@@ -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 )
     {
diff --git a/tests/datetime/datetimetest.cpp b/tests/datetime/datetimetest.cpp
index f2a0d60016..69452d8d08 100644
--- a/tests/datetime/datetimetest.cpp
+++ b/tests/datetime/datetimetest.cpp
@@ -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());