mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +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) {
|
foreach ($this as $timeframeIdentifier => $timeframe) {
|
||||||
if ($this->negative) {
|
if ($this->negative) {
|
||||||
if ($dateTime <= $timeframe->start && $dateTime > $timeframe->end) {
|
if ($dateTime <= $timeframe->start && $dateTime >= $timeframe->end) {
|
||||||
return $asTimestamp ? $timeframeIdentifier : $timeframe;
|
return $asTimestamp ? $timeframeIdentifier : $timeframe;
|
||||||
}
|
}
|
||||||
} elseif ($dateTime >= $timeframe->start && $dateTime < $timeframe->end) {
|
} elseif ($dateTime >= $timeframe->start && $dateTime <= $timeframe->end) {
|
||||||
return $asTimestamp ? $timeframeIdentifier : $timeframe;
|
return $asTimestamp ? $timeframeIdentifier : $timeframe;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user