summaryrefslogtreecommitdiffabout
path: root/microkde
Unidiff
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdecore/klocale.cpp4
-rw-r--r--microkde/kdecore/klocale.h2
2 files changed, 4 insertions, 2 deletions
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
@@ -810,27 +810,29 @@ int KLocale::timezoneOffset( QString timeZone )
810{ 810{
811 int ret = 1001; 811 int ret = 1001;
812 int index = mTimeZoneList.findIndex( timeZone ); 812 int index = mTimeZoneList.findIndex( timeZone );
813 if ( index < 24 ) 813 if ( index < 24 )
814 ret = ( index-11 ) * 60 ; 814 ret = ( index-11 ) * 60 ;
815 return ret; 815 return ret;
816} 816}
817 817
818QStringList KLocale::timeZoneList() const 818QStringList KLocale::timeZoneList() const
819{ 819{
820 return mTimeZoneList; 820 return mTimeZoneList;
821} 821}
822void KLocale::setTimezone( const QString &timeZone ) 822void KLocale::setTimezone( const QString &timeZone, bool oddTZ )
823{ 823{
824 mTimeZoneOffset = timezoneOffset( timeZone ); 824 mTimeZoneOffset = timezoneOffset( timeZone );
825 if ( oddTZ )
826 mTimeZoneOffset += 30;
825} 827}
826 828
827void KLocale::setDaylightSaving( bool b, int start , int end ) 829void KLocale::setDaylightSaving( bool b, int start , int end )
828{ 830{
829 daylightEnabled = b; 831 daylightEnabled = b;
830 daylightStart = start; 832 daylightStart = start;
831 daylightEnd = end; 833 daylightEnd = end;
832 mSouthDaylight = (end < start); 834 mSouthDaylight = (end < start);
833 // qDebug("klocale daylight %d %d %d ", b, start , end ); 835 // qDebug("klocale daylight %d %d %d ", b, start , end );
834} 836}
835 837
836int KLocale::localTimeOffset( const QDateTime &dt ) 838int KLocale::localTimeOffset( const QDateTime &dt )
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
@@ -86,25 +86,25 @@ class KLocale
86 QString m_decimalSymbol; 86 QString m_decimalSymbol;
87 QString m_thousandsSeparator; 87 QString m_thousandsSeparator;
88 QString m_currencySymbol; 88 QString m_currencySymbol;
89 QString m_monetaryDecimalSymbol; 89 QString m_monetaryDecimalSymbol;
90 QString m_monetaryThousandsSeparator; 90 QString m_monetaryThousandsSeparator;
91 QString m_positiveSign; 91 QString m_positiveSign;
92 QString m_negativeSign; 92 QString m_negativeSign;
93 93
94 int timezoneOffset( QString ); 94 int timezoneOffset( QString );
95 QStringList timeZoneList() const; 95 QStringList timeZoneList() const;
96 void setDaylightSaving( bool, int , int ); 96 void setDaylightSaving( bool, int , int );
97 int localTimeOffset(const QDateTime &); 97 int localTimeOffset(const QDateTime &);
98 void setTimezone( const QString &timeZone ); 98 void setTimezone( const QString &timeZone , bool oddTZ);
99 private: 99 private:
100 QTime readTime(const QString &str, bool seconds, bool *ok) const; 100 QTime readTime(const QString &str, bool seconds, bool *ok) const;
101 QDate readDate(const QString &str, bool shortFormat, bool *ok) const; 101 QDate readDate(const QString &str, bool shortFormat, bool *ok) const;
102 KCalendarSystem *mCalendarSystem; 102 KCalendarSystem *mCalendarSystem;
103 bool mWeekStartsMonday; 103 bool mWeekStartsMonday;
104 bool mHourF24Format; 104 bool mHourF24Format;
105 IntDateFormat mIntDateFormat; 105 IntDateFormat mIntDateFormat;
106 IntDateFormat mIntTimeFormat; 106 IntDateFormat mIntTimeFormat;
107 int mLanguage; 107 int mLanguage;
108 QString mDateFormat; 108 QString mDateFormat;
109 QString mDateFormatShort; 109 QString mDateFormatShort;
110 QStringList mTimeZoneList; 110 QStringList mTimeZoneList;