[Xfce4-commits] <orage:master> 4.9.10.4 Fix for bug 8382 Orage shows events without considering time zone

Juha Kautto noreply at xfce.org
Mon Nov 25 14:42:01 CET 2013


Updating branch refs/heads/master
         to 661507ca187e420e069bf7a6106952d063b01fdd (commit)
       from 5f666dfff22daca24c031f0498b8962027d1ce6b (commit)

commit 661507ca187e420e069bf7a6106952d063b01fdd
Author: Juha Kautto <juha at xfce.org>
Date:   Mon Nov 25 15:38:01 2013 +0200

    4.9.10.4 Fix for bug 8382 Orage shows events without considering time zone
    
    List views showed events on wrong day if the real date in the event was
    actually on another day in local time due to timezone conversion.

 configure.in.in |    2 +-
 src/ical-code.c |   14 ++++++++++----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/configure.in.in b/configure.in.in
index 6cdc5a3..0d9a9d3 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -9,7 +9,7 @@ dnl Written for Xfce by Juha Kautto <juha at xfce.org>
 dnl
 
 dnl Version information
-m4_define([orage_version], [4.9.10.3-git])
+m4_define([orage_version], [4.9.10.4-git])
 
 m4_define([gtk_minimum_version], [2.14.0])
 m4_define([xfce_minimum_version], [4.8.0])
diff --git a/src/ical-code.c b/src/ical-code.c
index 1f92c0c..8d450f4 100644
--- a/src/ical-code.c
+++ b/src/ical-code.c
@@ -3733,7 +3733,7 @@ static void add_appt_to_list(icalcomponent *c, icaltime_span *span , void *data)
     app_data *data1;
         /* Need to check that returned value is withing limits.
            Check more from BUG 5764 and 7886. */
-    icaltime_span limit_span, test_span;
+    icaltime_span test_span;
 
 #ifdef ORAGE_DEBUG
     orage_message(-100, P_N);
@@ -3744,7 +3744,7 @@ static void add_appt_to_list(icalcomponent *c, icaltime_span *span , void *data)
      * when UID changes. This seems to be fast enough as it is though */
     key_found = get_appt_from_icalcomponent(c, appt);
     xfical_appt_get_fill_internal(appt, data1->file_type);
-        /*
+    /*
     if (data1->file_type[0] == 'F') {
     orage_message(10, P_N "1 Title (%s)\n\tcur Start:%s End:%s\n\tlimit Start:%s End:%s\n\traw Start:%s (%s) End:%s (%s)"
 , appt->title
@@ -3793,8 +3793,10 @@ static void add_appt_to_list(icalcomponent *c, icaltime_span *span , void *data)
             */
         /* Need to check that returned value is withing limits.
            Check more from BUG 5764 and 7886. */
-    limit_span = icaltime_span_new(data1->asdate, data1->aedate, TRUE);
-    if (!icaltime_span_overlaps(&test_span, &limit_span)) {
+    /* starttimecur and endtimecur are in local timezone. Compare that to
+       limits, which are also localtimezone DATEs */
+    if (strcmp(appt->endtimecur, icaltime_as_ical_string(data1->asdate)) < 0
+    || strcmp(appt->starttimecur, icaltime_as_ical_string(data1->aedate)) > 0) {
         /* we do not need this. Free the memory */
         xfical_appt_free(appt);
     } 
@@ -3851,6 +3853,10 @@ static void xfical_get_each_app_within_time_internal(char *a_day, gint days
            Check more from BUG 5764 and 7886. */
     data1.asdate = asdate;
     data1.aedate = aedate;
+    /* Hack for bug 8382: Take one more day earlier and later than needed
+       due to UTC conversion. (And drop those days later then.) */
+    asdate.day--;
+    aedate.day++;
     for (c = icalcomponent_get_first_component(base, ikind);
          c != 0;
          c = icalcomponent_get_next_component(base, ikind)) {


More information about the Xfce4-commits mailing list