aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2002-10-18 05:34:10 +0800
committerJP Rosevear <jpr@src.gnome.org>2002-10-18 05:34:10 +0800
commita3da56611e96dae9fc2f4205e59820b1214e4172 (patch)
tree0615b0746c4f5513d5b251580de7cf988a304efe /calendar/gui/dialogs
parentd536b6d10b7e403d017b9b5a935657dcf23115b3 (diff)
downloadgsoc2013-evolution-a3da56611e96dae9fc2f4205e59820b1214e4172.tar.gz
gsoc2013-evolution-a3da56611e96dae9fc2f4205e59820b1214e4172.tar.zst
gsoc2013-evolution-a3da56611e96dae9fc2f4205e59820b1214e4172.zip
if the value is a datetime, convert it to a date
2002-10-17 JP Rosevear <jpr@ximian.com> * gui/dialogs/recurrence-page.c (fill_ending_date): if the value is a datetime, convert it to a date * gui/itip-utils.c (comp_compliant): convert an UNTIL date value to a datetime value * cal-util/cal-component.c (cal_component_has_simple_recurrence): check to see if the component recurrences meet our definition of "simple" * cal-util/cal-component.h: new proto svn path=/trunk/; revision=18389
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/recurrence-page.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index f587c6dbcb..3fb07a0559 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -1534,6 +1534,30 @@ fill_ending_date (RecurrencePage *rpage, struct icalrecurrencetype *r)
} else {
/* Ending date */
+ if (!r->until.is_date) {
+ CalClient *client = COMP_EDITOR_PAGE (rpage)->client;
+ CalComponentDateTime dt;
+ icaltimezone *from_zone, *to_zone;
+
+ cal_component_get_dtstart (priv->comp, &dt);
+
+ if (dt.value->is_date)
+ to_zone = icaltimezone_get_builtin_timezone (calendar_config_get_timezone ());
+ else if (dt.tzid == NULL)
+ to_zone = icaltimezone_get_utc_timezone ();
+ else
+ cal_client_get_timezone (client, dt.tzid, &to_zone);
+ from_zone = icaltimezone_get_utc_timezone ();
+
+ icaltimezone_convert_time (&r->until, from_zone, to_zone);
+
+ r->until.hour = 0;
+ r->until.minute = 0;
+ r->until.second = 0;
+ r->until.is_date = TRUE;
+ r->until.is_utc = FALSE;
+ }
+
priv->ending_date_tt = r->until;
e_dialog_option_menu_set (priv->ending_menu,
ENDING_UNTIL,