-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 5 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.cpp | 3 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.h | 1 | ||||
-rw-r--r-- | microkde/kdecore/klocale.cpp | 4 | ||||
-rw-r--r-- | microkde/kdecore/klocale.h | 2 |
5 files changed, 12 insertions, 3 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 1eef150..332f975 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp @@ -324,4 +324,9 @@ void KDEPIMConfigWidget::setupTimeZoneTab() int iii = 1; KPrefsWidBool *sb = + addWidBool(i18n("Add 30 min (+00:30) to selected Timezone"), + &(KPimGlobalPrefs::instance()->mTimeZoneAdd30min),topFrame); + topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); + ++iii; + sb = addWidBool(i18n("Timezone has daylight saving"), &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index 5081b26..04e2072 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp @@ -60,4 +60,5 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) addItemString("TimeZoneName",&mTimeZoneId,i18n ("+01:00 Europe/Oslo(CET)") ); addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); + addItemBool("TimeZoneAdd30min",&mTimeZoneAdd30min,false); addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); @@ -119,5 +120,5 @@ void KPimGlobalPrefs::setGlobalConfig() mDaylightsavingStart, mDaylightsavingEnd ); - KGlobal::locale()->setTimezone( mTimeZoneId ); + KGlobal::locale()->setTimezone( mTimeZoneId, mTimeZoneAdd30min ); } diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h index f6b6628..7c55099 100644 --- a/libkdepim/kpimglobalprefs.h +++ b/libkdepim/kpimglobalprefs.h @@ -97,4 +97,5 @@ class KPimGlobalPrefs : public KPrefs int mDaylightsavingStart; int mDaylightsavingEnd; + bool mTimeZoneAdd30min; int mEmailClient; diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp index 27acfec..673d845 100644 --- a/microkde/kdecore/klocale.cpp +++ b/microkde/kdecore/klocale.cpp @@ -820,7 +820,9 @@ QStringList KLocale::timeZoneList() const return mTimeZoneList; } -void KLocale::setTimezone( const QString &timeZone ) +void KLocale::setTimezone( const QString &timeZone, bool oddTZ ) { mTimeZoneOffset = timezoneOffset( timeZone ); + if ( oddTZ ) + mTimeZoneOffset += 30; } diff --git a/microkde/kdecore/klocale.h b/microkde/kdecore/klocale.h index 5783530..be9442c 100644 --- a/microkde/kdecore/klocale.h +++ b/microkde/kdecore/klocale.h @@ -96,5 +96,5 @@ class KLocale void setDaylightSaving( bool, int , int ); int localTimeOffset(const QDateTime &); - void setTimezone( const QString &timeZone ); + void setTimezone( const QString &timeZone , bool oddTZ); private: QTime readTime(const QString &str, bool seconds, bool *ok) const; |