Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Commit

Permalink
Merge branch 'jb48628' into 'master'
Browse files Browse the repository at this point in the history
[kcalcore] Return tz parameter in case of offset mismatch. Contributes to JB#48628

See merge request mer-core/kcalcore!14
  • Loading branch information
chriadam committed Jan 22, 2020
2 parents 3ef35e5 + 5cd355d commit ed7a28b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kcalcore/icaltimezones.cpp
Expand Up @@ -1044,6 +1044,10 @@ ICalTimeZone ICalTimeZoneSource::parse( MSTimeZone *tz, ICalTimeZones &zones )
}
const ICalTimeZone oldzone = zones.zone( zone );
if ( oldzone.isValid() ) {
const QDateTime currDateTime = QDateTime::currentDateTimeUtc();
if ( zone.offsetAtUtc(currDateTime) != oldzone.offsetAtUtc(currDateTime) ) {
return zone; // use the new zone, as its offset data is what the client wants.
}
// A similar zone already exists in the collection, so don't add this
// new zone, return old zone instead.
return oldzone;
Expand Down

0 comments on commit ed7a28b

Please sign in to comment.