libical/libical-1.0-r1150.patch

25 lines
1.0 KiB
Diff

Backported upstream patch to move the time zone fix in icaltimezone_get_utc_offset over
to icaltimezone_get_utc_offset_of_utc_time. r1141 made a fix in the first function but not
the second. This ensures these almost identical methods behave almost identically :) See
http://sourceforge.net/p/freeassociation/code/1150/ for the upstream patch and also Red Hat
Bugzilla at https://bugzilla.redhat.com/show_bug.cgi?id=1021136
--- libical-1.0/src/libical/icaltimezone.c 2013-04-14 19:24:42.000000000 +0200
+++ libical-1.0/src/libical/icaltimezone.c.r1150 2013-10-20 01:31:42.000000000 +0200
@@ -1045,9 +1045,12 @@
change_num += step;
/* If we go past the start of the changes array, then we have no data
- for this time so we return a UTC offset of 0. */
- if (change_num < 0)
- return 0;
+ for this time so we return the prev UTC offset. */
+ if (change_num < 0) {
+ if (is_daylight)
+ *is_daylight = ! tmp_change.is_daylight;
+ return tmp_change.prev_utc_offset;
+ }
if ((unsigned int)change_num >= zone->changes->num_elements)
break;