From 17fb49b6a7c0b40cfa075e4c9461ac5f907a3303 Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Tue, 24 Jul 2001 23:04:59 +0000 Subject: calculate tmp_tm.tm_wday ourselves. strftime has a habit of crashing if 2001-07-24 Damon Chaplin * 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 --- calendar/gui/dialogs/recurrence-page.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'calendar/gui') 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 #include "e-util/e-dialog-widgets.h" #include "widgets/misc/e-dateedit.h" +#include #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; } -- cgit v1.2.3