summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2015-04-29 18:31:53 +0200
committerChristian Mollekopf <mollekopf@kolabsys.com>2015-04-29 18:31:53 +0200
commitc979e73a70d53f1c0812511fbf3ffc20eb7f74c1 (patch)
treebf1428f643a5afcaf1f09838e3e3bc4261392145
parent22e7ad78f457f46a57b7c73d0e76d1d66d8a6caa (diff)
downloadlibkolab-c979e73a70d53f1c0812511fbf3ffc20eb7f74c1.tar.gz
Get timezones from system.
Otherwise they don't contain the correct information.
-rw-r--r--tests/kcalconversiontest.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/kcalconversiontest.cpp b/tests/kcalconversiontest.cpp
index ad3111a..5a51b0f 100644
--- a/tests/kcalconversiontest.cpp
+++ b/tests/kcalconversiontest.cpp
@@ -24,6 +24,7 @@
#include <kcalcore/recurrence.h>
#include <kcontacts/addressee.h>
#include <KTimeZone>
+#include <KSystemTimeZones>
#include "conversion/kcalconversion.h"
#include "conversion/kcalconversion.cpp"
@@ -62,7 +63,7 @@ void KCalConversionTest::testDate_data()
QTest::addColumn<Kolab::cDateTime>( "input" );
QTest::addColumn<KDateTime>( "result" );
- QTest::newRow( "datetime with tz" ) << Kolab::cDateTime("Europe/Zurich",2006,1,8,12,0,0) << KDateTime(QDate(2006, 1, 8), QTime(12, 0, 0), KTimeZone("Europe/Zurich"));
+ QTest::newRow( "datetime with tz" ) << Kolab::cDateTime("Europe/Zurich",2006,1,8,12,0,0) << KDateTime(QDate(2006, 1, 8), QTime(12, 0, 0), KSystemTimeZones::zone("Europe/Zurich"));
QTest::newRow( "floating datetime" ) << Kolab::cDateTime(2006,1,8,12,0,0, false) << KDateTime(QDate(2006, 1, 8), QTime(12, 0, 0), KDateTime::Spec(KDateTime::ClockTime));
QTest::newRow( "utc datetime" ) << Kolab::cDateTime(2006,1,8,12,0,0, true) << KDateTime(KDateTime(QDate(2006, 1, 8), QTime(12, 0, 0), KDateTime::UTC));
QTest::newRow( "date only" ) << Kolab::cDateTime(2006,1,8) << KDateTime(QDate(2006, 1, 8));
@@ -115,7 +116,7 @@ void KCalConversionTest::testDateTZ_data()
QTest::addColumn<Kolab::cDateTime>( "input" );
QTest::addColumn<KDateTime>( "result" );
- QTest::newRow( "berlin" ) << Kolab::cDateTime("Europe/Berlin",2006,1,8,12,0,0) << KDateTime(QDate(2006, 1, 8), QTime(12, 0, 0), KTimeZone("Europe/Berlin"));
+ QTest::newRow( "berlin" ) << Kolab::cDateTime("Europe/Berlin",2006,1,8,12,0,0) << KDateTime(QDate(2006, 1, 8), QTime(12, 0, 0), KSystemTimeZones::zone("Europe/Berlin"));
}
void KCalConversionTest::testDateTZ()