X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fical_dezonify.c;h=04d41e7c90b0887cd5c2b02dac946bd8028d4c4c;hb=6fa6542eb4a8f390488f2a453baec1bf8de1a1fb;hp=34c0e4bff64e77c381d6a9f3e44c300af1fb3cab;hpb=15054b0f11409cfc68102560fe4ab5a4e2bf4ea0;p=citadel.git diff --git a/citadel/ical_dezonify.c b/citadel/ical_dezonify.c index 34c0e4bff..04d41e7c9 100644 --- a/citadel/ical_dezonify.c +++ b/citadel/ical_dezonify.c @@ -1,12 +1,12 @@ -/* +/* * Function to go through an ical component set and convert all non-UTC * date/time properties to UTC. It also strips out any VTIMEZONE * subcomponents afterwards, because they're irrelevant. * - * Copyright (c) 1987-2015 by the citadel.org team + * Copyright (c) 1987-2017 by the citadel.org team * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 3. + * This program is open source software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -33,7 +33,6 @@ #include "support.h" #include "config.h" #include "ical_dezonify.h" - #include "ctdl_module.h" @@ -50,13 +49,11 @@ icaltimezone *get_default_icaltimezone(void) { zone = icaltimezone_get_builtin_timezone(default_zone_name); } if (!zone) { - syslog(LOG_ALERT, - "Unable to load '%s' time zone. Defaulting to UTC.\n", - default_zone_name); + syslog(LOG_ERR, "ical: Unable to load '%s' time zone. Defaulting to UTC.", default_zone_name); zone = icaltimezone_get_utc_timezone(); } if (!zone) { - syslog(LOG_ALERT, "Unable to load UTC time zone!\n"); + syslog(LOG_ERR, "ical: unable to load UTC time zone!"); } return zone; } @@ -138,13 +135,13 @@ void ical_dezonify_backend(icalcomponent *cal, /* syslog(LOG_DEBUG, " * Was: %s\n", icaltime_as_ical_string(TheTime)); */ - if (TheTime.is_utc) { + if (icaltime_is_utc(TheTime)) { /* syslog(LOG_DEBUG, " * This property is ALREADY UTC.\n"); */ } else if (utc_declared_as_tzid) { /* syslog(LOG_DEBUG, " * Replacing '%s' TZID with 'Z' suffix.\n", tzid); */ - TheTime.is_utc = 1; + TheTime.zone = icaltimezone_get_utc_timezone(); } else { @@ -164,7 +161,7 @@ void ical_dezonify_backend(icalcomponent *cal, t, icaltimezone_get_utc_timezone() ); - TheTime.is_utc = 1; + TheTime.zone = icaltimezone_get_utc_timezone(); } icalproperty_remove_parameter_by_kind(prop, ICAL_TZID_PARAMETER);