From 7f4a70d29e35b2a18da99755d1cef96df5f6f7a9 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 11 May 2016 00:00:27 -0400 Subject: [PATCH] Exclusion: Properly anchor < and > at midnight --- src/Exclusion.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Exclusion.cpp b/src/Exclusion.cpp index ddc834a3..fa49bbba 100644 --- a/src/Exclusion.cpp +++ b/src/Exclusion.cpp @@ -164,13 +164,15 @@ Range Exclusion::rangeFromTimeBlock ( { int hh, mm, ss; if (pig.getHMS (hh, mm, ss)) - return Range (start, Datetime (start.year (), start.month (), start.day (), hh, mm, ss)); + return Range (Datetime (start.year (), start.month (), start.day (), 0, 0, 0), + Datetime (start.year (), start.month (), start.day (), hh, mm, ss)); } else if (pig.skip ('>')) { int hh, mm, ss; if (pig.getHMS (hh, mm, ss)) - return Range (Datetime (start.year (), start.month (), start.day (), hh, mm, ss), end); + return Range (Datetime (start.year (), start.month (), start.day (), hh, mm, ss), + Datetime (end.year (), end.month (), end.day (), 0, 0, 0)); } else {