[evolution-data-server] e-cal-recur.c:ensure_timezone(): Unset icaltimetype::zone only if not UTC



commit fcbecd4fb1005c29bea965e45f086d5b102576d7
Author: Milan Crha <mcrha redhat com>
Date:   Thu Oct 5 13:50:08 2017 +0200

    e-cal-recur.c:ensure_timezone(): Unset icaltimetype::zone only if not UTC
    
    With a removal of icaltimetype::is_utc the icaltimetype::zone is used
    to determine whether it's UTC or not. That means that the icaltimetype::zone
    can be unset only if it's not the built-in UTC time zone.

 src/calendar/libecal/e-cal-recur.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/calendar/libecal/e-cal-recur.c b/src/calendar/libecal/e-cal-recur.c
index cad588c..fc14fb1 100644
--- a/src/calendar/libecal/e-cal-recur.c
+++ b/src/calendar/libecal/e-cal-recur.c
@@ -193,7 +193,8 @@ ensure_timezone (icalcomponent *comp,
 
        /* Do not trust the 'zone' set on the structure, as it can come from
           a different icalcomponent and cause use-after-free. */
-       tt->zone = NULL;
+       if (tt->zone != icaltimezone_get_utc_timezone ())
+               tt->zone = NULL;
 
        if (icaltime_is_utc (*tt))
                return TRUE;


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