mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-22 20:25:43 +00:00
fix: use current date when update domain statuses
This commit is contained in:
parent
cbeba957d3
commit
0e7622e77e
@ -254,10 +254,10 @@ readonly class RDAPService
|
|||||||
if (count($addedStatus) > 0 || count($deletedStatus) > 0) {
|
if (count($addedStatus) > 0 || count($deletedStatus) > 0) {
|
||||||
$this->em->persist($domain);
|
$this->em->persist($domain);
|
||||||
|
|
||||||
if ($domain->getUpdatedAt()->getTimestamp() !== $domain->getCreatedAt()->getTimestamp()) {
|
if ($domain->getUpdatedAt() !== $domain->getCreatedAt()) {
|
||||||
$this->em->persist((new DomainStatus())
|
$this->em->persist((new DomainStatus())
|
||||||
->setDomain($domain)
|
->setDomain($domain)
|
||||||
->setDate($domain->getUpdatedAt())
|
->setDate(new \DateTimeImmutable('now'))
|
||||||
->setAddStatus($addedStatus)
|
->setAddStatus($addedStatus)
|
||||||
->setDeleteStatus($deletedStatus));
|
->setDeleteStatus($deletedStatus));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user