aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/cal-util/calobj.c8
-rw-r--r--calendar/calobj.c8
-rw-r--r--calendar/pcs/calobj.c8
4 files changed, 30 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 5a8c4b85c1..3093db0fd7 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,9 @@
+1999-06-01 Miguel de Icaza <miguel@nuclecu.unam.mx>
+
+ * 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.
+
1999-05-28 Miguel de Icaza <miguel@nuclecu.unam.mx>
* Makefile.am (install-data-local): help files be gone. They are
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;
diff --git a/calendar/calobj.c b/calendar/calobj.c
index 59c34c866a..dbc3bf2f1b 100644
--- a/calendar/calobj.c
+++ b/calendar/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;
diff --git a/calendar/pcs/calobj.c b/calendar/pcs/calobj.c
index 59c34c866a..dbc3bf2f1b 100644
--- a/calendar/pcs/calobj.c
+++ b/calendar/pcs/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;