diff options
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 5 | ||||
-rw-r--r-- | calendar/gui/calendar-model.c | 16 |
2 files changed, 17 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 268377b4ff..7471edd26d 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,8 @@ +2002-08-22 JP Rosevear <jpr@ximian.com> + + * gui/calendar-model.c (set_completed): if the value given is a + date, convert to a time in the current zone + 2002-08-20 JP Rosevear <jpr@ximian.com> * gui/tasks-control.c (tasks_control_activate): don't set the diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c index 976da12b96..cef066c1b1 100644 --- a/calendar/gui/calendar-model.c +++ b/calendar/gui/calendar-model.c @@ -990,6 +990,7 @@ set_classification (CalComponent *comp, static void set_completed (CalendarModel *model, CalComponent *comp, const void *value) { + CalendarModelPrivate *priv = model->priv; ECellDateEditValue *dv = (ECellDateEditValue*) value; if (!dv) { @@ -997,10 +998,17 @@ set_completed (CalendarModel *model, CalComponent *comp, const void *value) } else { time_t t; - /* We assume that COMPLETED is entered in the current timezone, - even though it gets stored in UTC. */ - t = icaltime_as_timet_with_zone (dv->tt, dv->zone); - + if (dv->tt.is_date) { + /* If its a date, it will be floating, + but completed needs a date time value */ + dv->tt.is_date = FALSE; + t = icaltime_as_timet_with_zone (dv->tt, priv->zone); + } else { + /* We assume that COMPLETED is entered in the current timezone, + even though it gets stored in UTC. */ + t = icaltime_as_timet_with_zone (dv->tt, dv->zone); + } + ensure_task_complete (comp, t); } } |