summaryrefslogtreecommitdiff
path: root/src/libical
diff options
context:
space:
mode:
authorGyörgy Kurucz <kuruczgyurci@hotmail.com>2021-02-11 22:25:04 +0100
committerAllen Winter <allen.winter@kdab.com>2021-04-11 13:00:06 -0400
commitbf46cdfcae96697aede54aec4772a348c7dee4fc (patch)
tree061256687a28a14777ee16f09b95e0efa6a07696 /src/libical
parent46d829b62cd4a11eddd3e8ce020e6b90cb981a83 (diff)
downloadlibical-git-bf46cdfcae96697aede54aec4772a348c7dee4fc.tar.gz
Fix generating wrong recurrence rules from tzdata
Signed-off-by: Allen Winter <allen.winter@kdab.com>
Diffstat (limited to 'src/libical')
-rw-r--r--src/libical/icaltz-util.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libical/icaltz-util.c b/src/libical/icaltz-util.c
index 181317d0..0afa17fa 100644
--- a/src/libical/icaltz-util.c
+++ b/src/libical/icaltz-util.c
@@ -530,7 +530,10 @@ icalcomponent *icaltzutil_fetch_timezone(const char *location)
// If it has, create a new component and update UNTIL of previous component's RRULE
if (daylight_recur.by_month[0] != icaltime.month ||
daylight_recur.by_day[0] != by_day ||
- types[prev_idx].gmtoff != prev_daylight_gmtoff) {
+ types[prev_idx].gmtoff != prev_daylight_gmtoff ||
+ prev_daylight_time.hour != icaltime.hour ||
+ prev_daylight_time.minute != icaltime.minute ||
+ prev_daylight_time.second != icaltime.second) {
// Set UNTIL of the previous component's recurrence
icaltime_adjust(&prev_daylight_time, 0, 0, 0, -types[prev_idx].gmtoff);
prev_daylight_time.zone = icaltimezone_get_utc_timezone();
@@ -564,7 +567,10 @@ icalcomponent *icaltzutil_fetch_timezone(const char *location)
// of the previous component's RRULE
if (standard_recur.by_month[0] != icaltime.month ||
standard_recur.by_day[0] != by_day ||
- types[prev_idx].gmtoff != prev_standard_gmtoff) {
+ types[prev_idx].gmtoff != prev_standard_gmtoff ||
+ prev_standard_time.hour != icaltime.hour ||
+ prev_standard_time.minute != icaltime.minute ||
+ prev_standard_time.second != icaltime.second) {
icaltime_adjust(&prev_standard_time, 0, 0, 0, -types[prev_idx].gmtoff);
prev_standard_time.zone = icaltimezone_get_utc_timezone();