Exclusion: Properly anchor < and > at midnight

This commit is contained in:
Paul Beckingham 2016-05-11 00:00:27 -04:00
parent 95b09b4c60
commit 7f4a70d29e

View file

@ -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
{