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 <calcurse@cryptocrack.de>
This commit is contained in:
parent
0e5a9f1620
commit
2030a0563c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user