From 2030a0563ca0b9e4a66a0721dc708af8f5401e22 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 13 Mar 2011 12:57:55 +0100 Subject: Parse appointment end times correctly if they date back. End times used to be parsed incorrectly if start and end time's hour components were equal, but the end time was smaller than the start time. This is fixed by comparing the minute components as well in case of equal hour components. Signed-off-by: Lukas Fleischer --- src/apoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apoint.c b/src/apoint.c index 427c43f..38b41ae 100644 --- a/src/apoint.c +++ b/src/apoint.c @@ -228,7 +228,7 @@ apoint_add (void) else if (check_time (item_time) == 1) { (void)sscanf (item_time, "%u:%u", &end_h, &end_m); - if (end_h < heures) + if (end_h < heures || ((end_h == heures) && (end_m < minutes))) { apoint_duration = MININSEC - minutes + end_m + (24 + end_h - (heures + 1)) * MININSEC; -- cgit v1.2.3-70-g09d2