[evolution-mapi/gnome-3-26] Use icaltime_is_utc() instead of icaltimetype::is_utc



commit 642fcdb8f1d970be01ce428486212dd74876ee3c
Author: Milan Crha <mcrha redhat com>
Date:   Wed Oct 4 12:01:39 2017 +0200

    Use icaltime_is_utc() instead of icaltimetype::is_utc
    
    The structure member is going to be removed from libical in the next release
    and the function is available for a long time, thus it's safe to replace
    the usage in the code.

 src/libexchangemapi/e-mapi-cal-tz-utils.c |    2 +-
 src/libexchangemapi/e-mapi-cal-utils.c    |   15 ++++++++++++---
 2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/src/libexchangemapi/e-mapi-cal-tz-utils.c b/src/libexchangemapi/e-mapi-cal-tz-utils.c
index 72abe0c..af0b1a4 100644
--- a/src/libexchangemapi/e-mapi-cal-tz-utils.c
+++ b/src/libexchangemapi/e-mapi-cal-tz-utils.c
@@ -94,7 +94,7 @@ e_mapi_tm_to_icaltimetype (struct tm *tm,
        itt.month = dst ? 6 : 1;
        itt.year = tm->tm_year + 1900;
 
-       itt.is_utc = 0;
+       itt.zone = NULL;
        itt.is_date = 0;
 
        return itt;
diff --git a/src/libexchangemapi/e-mapi-cal-utils.c b/src/libexchangemapi/e-mapi-cal-utils.c
index 475e065..7340f67 100644
--- a/src/libexchangemapi/e-mapi-cal-utils.c
+++ b/src/libexchangemapi/e-mapi-cal-utils.c
@@ -2170,20 +2170,29 @@ e_mapi_cal_utils_comp_to_object (EMapiConnection *conn,
                        prop = icalcomponent_get_first_property (ical_comp, ICAL_COMPLETED_PROPERTY);
                        completed = icalproperty_get_completed (prop);
 
-                       completed.hour = completed.minute = completed.second = 0; completed.is_date = 
completed.is_utc = 1;
+                       completed.hour = completed.minute = completed.second = 0;
+                       completed.is_date = 1;
+                       completed.zone = utc_zone;
+
                        tt = icaltime_as_timet (completed);
                        set_timet_value (PidLidTaskDateCompleted, tt);
                }
 
                /* Start */
-               dtstart.hour = dtstart.minute = dtstart.second = 0; dtstart.is_date = dtstart.is_utc = 1;
+               dtstart.hour = dtstart.minute = dtstart.second = 0;
+               dtstart.is_date = 1;
+               dtstart.zone = utc_zone;
+
                tt = icaltime_as_timet (dtstart);
                if (!icaltime_is_null_time (dtstart)) {
                        set_timet_value (PidLidTaskStartDate, tt);
                }
 
                /* Due */
-               dtend.hour = dtend.minute = dtend.second = 0; dtend.is_date = dtend.is_utc = 1;
+               dtend.hour = dtend.minute = dtend.second = 0;
+               dtend.is_date = 1;
+               dtend.zone = utc_zone;
+
                tt = icaltime_as_timet (dtend);
                if (!icaltime_is_null_time (dtend)) {
                        set_timet_value (PidLidTaskDueDate, tt);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]