From 2d89d336689358ddc4aba9d28bc8b25b60c21f95 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 6 Oct 2011 09:56:29 +0200 Subject: src/apoint.c: Format recurrent multi-day items properly Enable "..:.." formatting for recurrent appointments that last beyond midnight. Apart from our recurrent item handler being a tad broken, there is no reason not to do the same thing we already do with regular appointments here. Signed-off-by: Lukas Fleischer --- src/apoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apoint.c b/src/apoint.c index 36851c3..56028ca 100644 --- a/src/apoint.c +++ b/src/apoint.c @@ -396,7 +396,7 @@ apoint_sec2str (struct apoint *o, int type, long day, char *start, char *end) struct tm *lt; time_t t; - if (o->start < day && type == APPT) + if (o->start < day) (void)strncpy (start, "..:..", 6); else { @@ -404,7 +404,7 @@ apoint_sec2str (struct apoint *o, int type, long day, char *start, char *end) lt = localtime (&t); (void)snprintf (start, HRMIN_SIZE, "%02u:%02u", lt->tm_hour, lt->tm_min); } - if (o->start + o->dur > day + DAYINSEC && type == APPT) + if (o->start + o->dur > day + DAYINSEC) (void)strncpy (end, "..:..", 6); else { -- cgit v1.2.3-70-g09d2