/* 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 {
t,
icaltimezone_get_utc_timezone()
);
- TheTime.is_utc = 1;
+ TheTime.zone = icaltimezone_get_utc_timezone();
}
icalproperty_remove_parameter_by_kind(prop, ICAL_TZID_PARAMETER);
/* We found our own address in the attendee list. */
if (me_attend) {
/* Change the partstat from NEEDS-ACTION to ACCEPT or DECLINE */
- icalproperty_remove_parameter(me_attend, ICAL_PARTSTAT_PARAMETER);
+ icalproperty_remove_parameter_by_kind(me_attend, ICAL_PARTSTAT_PARAMETER);
if (!strcasecmp(action, "accept")) {
partstat = icalparameter_new_partstat(ICAL_PARTSTAT_ACCEPTED);
if (!icaltime_is_null_time(dtend)) {
dtend = icaltime_add(dtstart, dur);
dtend.zone = dtstart.zone;
- dtend.is_utc = dtstart.is_utc;
}
++num_recur;
}
icalcomponent_set_method(fb, ICAL_METHOD_PUBLISH);
/* Set the DTSTAMP to right now. */
- icalcomponent_set_dtstamp(fb, icaltime_from_timet(time(NULL), 0));
+ icalcomponent_set_dtstamp(fb, icaltime_from_timet_with_zone(time(NULL), 0, icaltimezone_get_utc_timezone()));
/* Add the user's email address as ORGANIZER */
sprintf(buf, "MAILTO:%s", who);
* to yesterday and tomorrow as default values.
*/
if (icalcomponent_get_first_property(fb, ICAL_DTSTART_PROPERTY) == NULL) {
- icalcomponent_set_dtstart(fb, icaltime_from_timet(time(NULL)-86400L, 0));
+ icalcomponent_set_dtstart(fb, icaltime_from_timet_with_zone(time(NULL)-86400L, 0, icaltimezone_get_utc_timezone()));
}
if (icalcomponent_get_first_property(fb, ICAL_DTEND_PROPERTY) == NULL) {
- icalcomponent_set_dtend(fb, icaltime_from_timet(time(NULL)+86400L, 0));
+ icalcomponent_set_dtend(fb, icaltime_from_timet_with_zone(time(NULL)+86400L, 0, icaltimezone_get_utc_timezone()));
}
/* Put the freebusy component into the calendar component */
t->minute = IBSTR(vname);
/* time zone is set to the default zone for this server */
- t->is_utc = 0;
t->is_date = 0;
t->zone = get_default_icaltimezone();
}
sscanf((char*)BSTR(prefix), "%04d-%02d-%02d", &t->year, &t->month, &t->day);
/* time zone is set to the default zone for this server */
- t->is_utc = 1;
+ t->zone = icaltimezone_get_utc_timezone();
t->is_date = 1;
}
starting_tm.tm_hour = 0;
starting_tm.tm_min = 0;
today_start_t = icaltime_from_timet_with_zone(mktime(&starting_tm), 0, icaltimezone_get_utc_timezone());
- today_start_t.is_utc = 1;
memset(&ending_tm, 0, sizeof(struct tm));
ending_tm.tm_year = year - 1900;
ending_tm.tm_hour = 23;
ending_tm.tm_min = 59;
today_end_t = icaltime_from_timet_with_zone(mktime(&ending_tm), 0, icaltimezone_get_utc_timezone());
- today_end_t.is_utc = 1;
/*
* Create another one without caring about the timezone for all day events.
starting_tm.tm_hour = 0;
starting_tm.tm_min = 0;
today_start_t = icaltime_from_timet_with_zone(mktime(&starting_tm), 0, icaltimezone_get_utc_timezone());
- today_start_t.is_utc = 1;
memset(&ending_tm, 0, sizeof(struct tm));
ending_tm.tm_year = year - 1900;
ending_tm.tm_hour = 23;
ending_tm.tm_min = 59;
today_end_t = icaltime_from_timet_with_zone(mktime(&ending_tm), 0, icaltimezone_get_utc_timezone());
- today_end_t.is_utc = 1;
/*
* Create another one without caring about the timezone for all day events.
((yesbstr("alldayevent")) ? 1 : 0),
icaltimezone_get_utc_timezone()
);
- t_start.is_utc = 1;
-
}
display_icaltimetype_as_webform(&t_start, "dtstart", 0);
/* Add NOW() to the calendar object... */
icalcomponent_set_dtstamp(vevent,
- icaltime_from_timet(
- time(NULL), 0));
+ icaltime_from_timet_with_zone(
+ time(NULL), 0, icaltimezone_get_utc_timezone()));
if (havebstr("summary")) {
icalcomponent_add_property(vevent,
syslog(LOG_DEBUG, " * Was: %s\n", icaltime_as_ical_string(TheTime));
#endif
- if (TheTime.is_utc) {
+ if (icaltime_is_utc(TheTime)) {
#ifdef DBG_ICAL
syslog(LOG_DEBUG, " * This property is ALREADY UTC.\n");
#endif
#ifdef DBG_ICAL
syslog(LOG_DEBUG, " * Replacing '%s' TZID with 'Z' suffix.\n", tzid);
#endif
- TheTime.is_utc = 1;
+ TheTime.zone = icaltimezone_get_utc_timezone();
}
else {
t = get_default_icaltimezone();
}
icaltimezone_convert_time(&TheTime, t, icaltimezone_get_utc_timezone());
- TheTime.is_utc = 1;
+ TheTime.zone = icaltimezone_get_utc_timezone();
}
icalproperty_remove_parameter_by_kind(prop, ICAL_TZID_PARAMETER);