aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorDamon Chaplin <damon@ximian.com>2001-07-25 07:04:59 +0800
committerDamon Chaplin <damon@src.gnome.org>2001-07-25 07:04:59 +0800
commit17fb49b6a7c0b40cfa075e4c9461ac5f907a3303 (patch)
treedbf59df0e5dd469a21b4138256c306d6ce4df00b /calendar
parent56edf691d72e71ef116d448dcf4f43193ec1e78e (diff)
downloadgsoc2013-evolution-17fb49b6a7c0b40cfa075e4c9461ac5f907a3303.tar.gz
gsoc2013-evolution-17fb49b6a7c0b40cfa075e4c9461ac5f907a3303.tar.zst
gsoc2013-evolution-17fb49b6a7c0b40cfa075e4c9461ac5f907a3303.zip
calculate tmp_tm.tm_wday ourselves. strftime has a habit of crashing if
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. svn path=/trunk/; revision=11369
Diffstat (limited to 'calendar')
-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;
}