Skip to content

Commit 5431e9e

Browse files
committed
We compare timeout DateTimeInterfaces objects directly rather than formatting dates (especially if Rules have different timezones)
1 parent a24f3ba commit 5431e9e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/CorrelationEngine.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,7 @@ public function getTimeouts(): array
448448
{
449449
//Sort by timeout
450450
if (false === $this->timeoutsSorted) {
451-
uasort($this->timeouts, function ($a, $b) { return $a['timeout']->format('Ydm His') <=> $b['timeout']->format('Ydm His'); });
452-
451+
uasort($this->timeouts, function ($a, $b) { return $a['timeout'] <=> $b['timeout']; });
453452
$this->timeoutsSorted = true;
454453
}
455454
return $this->timeouts;

0 commit comments

Comments
 (0)