-rw-r--r-- | microkde/kdecore/klocale.cpp | 4 | ||||
-rw-r--r-- | microkde/kdecore/klocale.h | 2 |
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 | |||
@@ -806,35 +806,37 @@ KCalendarSystem *KLocale::calendar() | |||
806 | return mCalendarSystem; | 806 | return mCalendarSystem; |
807 | } | 807 | } |
808 | 808 | ||
809 | int KLocale::timezoneOffset( QString timeZone ) | 809 | 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 | ||
818 | QStringList KLocale::timeZoneList() const | 818 | QStringList KLocale::timeZoneList() const |
819 | { | 819 | { |
820 | return mTimeZoneList; | 820 | return mTimeZoneList; |
821 | } | 821 | } |
822 | void KLocale::setTimezone( const QString &timeZone ) | 822 | void 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 | ||
827 | void KLocale::setDaylightSaving( bool b, int start , int end ) | 829 | void 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 | ||
836 | int KLocale::localTimeOffset( const QDateTime &dt ) | 838 | int KLocale::localTimeOffset( const QDateTime &dt ) |
837 | { | 839 | { |
838 | bool addDaylight = false; | 840 | bool addDaylight = false; |
839 | if ( daylightEnabled ) { | 841 | if ( daylightEnabled ) { |
840 | int d_end, d_start; | 842 | int d_end, d_start; |
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 | |||
@@ -82,33 +82,33 @@ class KLocale | |||
82 | void setLanguage( int ); | 82 | void setLanguage( int ); |
83 | void setDateFormat( QString ); | 83 | void setDateFormat( QString ); |
84 | void setDateFormatShort( QString ); | 84 | void setDateFormatShort( QString ); |
85 | 85 | ||
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; |
111 | bool daylightEnabled; | 111 | bool daylightEnabled; |
112 | int mDaylightTZoffset; | 112 | int mDaylightTZoffset; |
113 | int mNondaylightTZoffset; | 113 | int mNondaylightTZoffset; |
114 | bool mSouthDaylight; | 114 | bool mSouthDaylight; |