From 264925d54008c4310168fa69f30b8764d51cbe62 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Tue, 10 Sep 2002 18:34:19 +0000 Subject: duh, don't blindly increment the hour without adjusting for the day 2002-09-10 JP Rosevear * gui/comp-editor-factory.c (get_default_event): duh, don't blindly increment the hour without adjusting for the day boundaries Fixes #29983 svn path=/trunk/; revision=18034 --- calendar/ChangeLog | 8 ++++++++ calendar/gui/comp-editor-factory.c | 6 ++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index a4d0356cee..f8b32cbd2e 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,11 @@ +2002-09-10 JP Rosevear + + * gui/comp-editor-factory.c (get_default_event): duh, don't + blindly increment the hour without adjusting for the day + boundaries + + Fixes #29983 + 2002-09-10 Rodrigo Moya Fixes #24032 diff --git a/calendar/gui/comp-editor-factory.c b/calendar/gui/comp-editor-factory.c index b3c0c9edb1..8cba8baade 100644 --- a/calendar/gui/comp-editor-factory.c +++ b/calendar/gui/comp-editor-factory.c @@ -324,15 +324,13 @@ get_default_event (gboolean all_day) cal_component_set_dtend (comp, &dt); } else { itt = icaltime_current_time_with_zone (zone); - itt.hour++; - itt.minute = 0; - itt.second = 0; + icaltime_adjust (&itt, 0, 1, -itt.minute, -itt.second); dt.value = &itt; dt.tzid = icaltimezone_get_tzid (zone); cal_component_set_dtstart (comp, &dt); - itt.hour++; + icaltime_adjust (&itt, 0, 1, 0, 0); cal_component_set_dtend (comp, &dt); } -- cgit v1.2.3