aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c31
2 files changed, 24 insertions, 13 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 6beff2acdf..e29f3e8086 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,11 @@
2002-09-24 JP Rosevear <jpr@ximian.com>
+ * conduits/calendar/calendar-conduit.c (comp_from_remote_record):
+ make sure the start/end for no time palm events are DATE values,
+ tidy code slightly
+
+2002-09-24 JP Rosevear <jpr@ximian.com>
+
* conduits/calendar/calendar-conduit.c (process_multi_day):
convert to date values if the original start and end were both
dates
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
index d057ed49fe..dac3d7cf55 100644
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ b/calendar/conduits/calendar/calendar-conduit.c
@@ -938,7 +938,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
struct icaltimetype now = icaltime_from_timet_with_zone (time (NULL), FALSE, timezone), it;
struct icalrecurrencetype recur;
CalComponentText summary = {NULL, NULL};
- CalComponentDateTime dt = {NULL, icaltimezone_get_tzid (timezone)};
+ CalComponentDateTime dt = {NULL, NULL};
GSList *edl = NULL;
char *txt;
int pos, i;
@@ -978,21 +978,26 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
free (txt);
}
- if (!is_empty_time (appt.begin)) {
- it = tm_to_icaltimetype (&appt.begin, FALSE);
+ if (appt.event && !is_empty_time (appt.begin)) {
+ it = tm_to_icaltimetype (&appt.begin, TRUE);
dt.value = &it;
+ dt.tzid = NULL;
cal_component_set_dtstart (comp, &dt);
- }
-
- if (appt.event) {
- it = tm_to_icaltimetype (&appt.begin, FALSE);
- icaltime_adjust (&it, 1, 0, 0, 0);
- dt.value = &it;
- cal_component_set_dtend (comp, &dt);
- } else if (!is_empty_time (appt.end)) {
- it = tm_to_icaltimetype (&appt.end, FALSE);
- dt.value = &it;
cal_component_set_dtend (comp, &dt);
+ } else {
+ dt.tzid = icaltimezone_get_tzid (timezone);
+
+ if (!is_empty_time (appt.begin)) {
+ it = tm_to_icaltimetype (&appt.begin, FALSE);
+ dt.value = &it;
+ cal_component_set_dtstart (comp, &dt);
+ }
+
+ if (!is_empty_time (appt.end)) {
+ it = tm_to_icaltimetype (&appt.end, FALSE);
+ dt.value = &it;
+ cal_component_set_dtend (comp, &dt);
+ }
}
/* Recurrence information */