Changeset View
Changeset View
Standalone View
Standalone View
src/icaltimezones.cpp
Show First 20 Lines • Show All 132 Lines • ▼ Show 20 Line(s) | |||||
133 | QTimeZone ICalTimeZoneCache::tzForTime(const QDateTime &dt, const QByteArray &tzid) const | 133 | QTimeZone ICalTimeZoneCache::tzForTime(const QDateTime &dt, const QByteArray &tzid) const | ||
134 | { | 134 | { | ||
135 | if (QTimeZone::isTimeZoneIdAvailable(tzid)) { | 135 | if (QTimeZone::isTimeZoneIdAvailable(tzid)) { | ||
136 | return QTimeZone(tzid); | 136 | return QTimeZone(tzid); | ||
137 | } | 137 | } | ||
138 | 138 | | |||
139 | const ICalTimeZone tz = mCache.value(tzid); | 139 | const ICalTimeZone tz = mCache.value(tzid); | ||
140 | if (!tz.qZone.isValid()) { | 140 | if (!tz.qZone.isValid()) { | ||
141 | return QTimeZone::systemTimeZone(); | 141 | return QTimeZone(); | ||
dcaliste: The only call to this routine is from the icalformat_p.cpp in readICalDateTime if I grepped… | |||||
142 | } | 142 | } | ||
143 | 143 | | |||
144 | // If the matched timezone is one of the UTC offset timezones, we need to make | 144 | // If the matched timezone is one of the UTC offset timezones, we need to make | ||
145 | // sure it's in the correct DTS. | 145 | // sure it's in the correct DTS. | ||
146 | // The lookup in ICalTimeZoneParser will only find TZ in standard time, but | 146 | // The lookup in ICalTimeZoneParser will only find TZ in standard time, but | ||
147 | // if the datetim in question fits in the DTS zone, we need to use another UTC | 147 | // if the datetim in question fits in the DTS zone, we need to use another UTC | ||
148 | // offset timezone | 148 | // offset timezone | ||
149 | if (tz.qZone.id().startsWith("UTC")) { //krazy:exclude=strings | 149 | if (tz.qZone.id().startsWith("UTC")) { //krazy:exclude=strings | ||
▲ Show 20 Lines • Show All 585 Lines • Show Last 20 Lines |
The only call to this routine is from the icalformat_p.cpp in readICalDateTime if I grepped well. Thus changing this return for an imvalid QTimeZone should have no other impact than the one desired in this patch.