aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/calendar-model.c16
1 files changed, 12 insertions, 4 deletions
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);
}
}