aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2002-08-22 23:41:47 +0800
committerJP Rosevear <jpr@src.gnome.org>2002-08-22 23:41:47 +0800
commit5902ae223d54526a59b5943cb493854ad57de666 (patch)
tree5a969b7b635d49f81aa08bfe80ae36b6bbc96182 /calendar/gui
parent8b36f00ff0585622b34b8352218302abb7626a3b (diff)
downloadgsoc2013-evolution-5902ae223d54526a59b5943cb493854ad57de666.tar.gz
gsoc2013-evolution-5902ae223d54526a59b5943cb493854ad57de666.tar.zst
gsoc2013-evolution-5902ae223d54526a59b5943cb493854ad57de666.zip
if the value given is a date, convert to a time in the current zone
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 svn path=/trunk/; revision=17835
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);
}
}