fix: time diff calculation

This commit is contained in:
Maël Gangloff
2024-09-06 13:20:39 +02:00
parent ade9751802
commit 684313bc8f

View File

@@ -64,12 +64,14 @@ final readonly class UpdateDomainsFromWatchlistHandler
foreach ($watchList->getDomains() foreach ($watchList->getDomains()
->filter(fn ($domain) => $domain->getUpdatedAt() ->filter(fn ($domain) => $domain->getUpdatedAt()
->diff( ->diff(
new \DateTimeImmutable('now'))->days >= 7 new \DateTimeImmutable())->days >= 7
|| ( || (
$this->RDAPService::isToBeWatchClosely($domain) ($domain->getUpdatedAt()
&& $domain->getUpdatedAt() ->diff(
->diff( new \DateTimeImmutable())->h * 60 + $domain->getUpdatedAt()
new \DateTimeImmutable('now'))->i >= 55 ->diff(
new \DateTimeImmutable())->i) >= 50
&& $this->RDAPService::isToBeWatchClosely($domain)
) )
) as $domain ) as $domain
) { ) {