From 30d70369cb47669fde2630ce0159a709df26359d Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Wed, 2 Jun 1999 01:12:20 +0000 Subject: Work around broken software that writes a broken month-of-day as "zero". 1999-06-01 Miguel de Icaza * calobj.c (daynumberlist): Work around broken software that writes a broken month-of-day as "zero". Use the dtstart date for this on this event. svn path=/trunk/; revision=963 --- calendar/cal-util/calobj.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'calendar/cal-util/calobj.c') diff --git a/calendar/cal-util/calobj.c b/calendar/cal-util/calobj.c index 59c34c866a..dbc3bf2f1b 100644 --- a/calendar/cal-util/calobj.c +++ b/calendar/cal-util/calobj.c @@ -300,6 +300,14 @@ daynumberlist (iCalObject *o, char **str) (*str)++; } if (!first){ + /* + * Some broken applications set this to zero + */ + if (val == 0){ + struct tm *day = localtime (&o->dtstart); + + val = tm->tm_mday; + } o->recur->u.month_day = val; first = 1; val = 0; -- cgit v1.2.3