mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 13:54:26 +02:00
Fix that the TimeRange cannot handle events occured at full hours
refs #4190
This commit is contained in:
parent
862b50264a
commit
e21d288f5b
@ -130,10 +130,10 @@ class TimeRange implements Iterator
|
||||
{
|
||||
foreach ($this as $timeframeIdentifier => $timeframe) {
|
||||
if ($this->negative) {
|
||||
if ($dateTime <= $timeframe->start && $dateTime > $timeframe->end) {
|
||||
if ($dateTime <= $timeframe->start && $dateTime >= $timeframe->end) {
|
||||
return $asTimestamp ? $timeframeIdentifier : $timeframe;
|
||||
}
|
||||
} elseif ($dateTime >= $timeframe->start && $dateTime < $timeframe->end) {
|
||||
} elseif ($dateTime >= $timeframe->start && $dateTime <= $timeframe->end) {
|
||||
return $asTimestamp ? $timeframeIdentifier : $timeframe;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user