aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/calendar.c')
-rw-r--r--calendar/gui/calendar.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/calendar/gui/calendar.c b/calendar/gui/calendar.c
index 57c9ad9230..ec67b3243e 100644
--- a/calendar/gui/calendar.c
+++ b/calendar/gui/calendar.c
@@ -30,6 +30,7 @@ extern char *tzname[2];
time_t calendar_day_begin, calendar_day_end;
static void calendar_init_alarms (Calendar *cal);
+static void calendar_set_day (void);
Calendar *
calendar_new (char *title)
@@ -40,6 +41,9 @@ calendar_new (char *title)
cal->title = g_strdup (title);
+ if ((calendar_day_begin == 0) || (calendar_day_end == 0))
+ calendar_set_day ();
+
cal->event_hash = g_hash_table_new (g_str_hash, g_str_equal);
calendar_init_alarms (cal);