aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/dialogs/recurrence-page.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index b44a5c884c..a21a0ea9c1 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,9 @@
+2001-07-24 Damon Chaplin <damon@ximian.com>
+
+ * gui/dialogs/recurrence-page.c (get_exception_string): calculate
+ tmp_tm.tm_wday ourselves. strftime has a habit of crashing if you
+ have weird values here. I think this fixes bug #4574.
+
2001-07-24 JP Rosevear <jpr@ximian.com>
* gui/dialogs/meeting-page.c (value_at): stip the delto and
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index dc41ce37b6..df3dd7e9cf 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -35,6 +35,7 @@
#include <gal/widgets/e-unicode.h>
#include "e-util/e-dialog-widgets.h"
#include "widgets/misc/e-dateedit.h"
+#include <cal-util/timeutil.h>
#include "../calendar-config.h"
#include "../tag-calendar.h"
#include "../weekday-picker.h"
@@ -431,6 +432,10 @@ get_exception_string (CalComponentDateTime *dt)
tmp_tm.tm_sec = dt->value->second;
tmp_tm.tm_isdst = -1;
+ tmp_tm.tm_wday = time_day_of_week (dt->value->day,
+ dt->value->month - 1,
+ dt->value->year);
+
strftime (buf, sizeof (buf), _("%a %b %d %Y"), &tmp_tm);
return buf;
}