aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-day-view.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 800278e7fd..91c7d77ff9 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -2404,6 +2404,7 @@ e_day_view_on_new_appointment (GtkWidget *widget, gpointer data)
CalComponent *comp;
CalComponentDateTime date;
time_t dtstart, dtend;
+ struct icaltimetype itt;
day_view = E_DAY_VIEW (data);
@@ -2411,12 +2412,14 @@ e_day_view_on_new_appointment (GtkWidget *widget, gpointer data)
cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT);
e_day_view_get_selected_time_range (day_view, &dtstart, &dtend);
- date.value = g_new (struct icaltimetype, 1);
+ date.value = &itt;
+ date.tzid = NULL;
+
*date.value = icaltimetype_from_timet (dtstart, FALSE);
cal_component_set_dtstart (comp, &date);
+
*date.value = icaltimetype_from_timet (dtend, FALSE);
cal_component_set_dtend (comp, &date);
- g_free (date.value);
cal_component_commit_sequence (comp);