From b0b2b6a94d17f9786378667916d9f60454b8f7b1 Mon Sep 17 00:00:00 2001 From: Hosteroid Date: Sat, 11 Oct 2025 01:15:03 +0300 Subject: [PATCH] Normalize dates in TldRegistryService results Updated the assignment of 'registration_date' and 'record_last_updated' fields to use the normalizeDate method, ensuring consistent date formatting in the TldRegistryService output. --- app/Services/TldRegistryService.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Services/TldRegistryService.php b/app/Services/TldRegistryService.php index 70a8c20..41126a5 100644 --- a/app/Services/TldRegistryService.php +++ b/app/Services/TldRegistryService.php @@ -1430,10 +1430,10 @@ class TldRegistryService if (isset($event['eventAction']) && isset($event['eventDate'])) { switch ($event['eventAction']) { case 'registration': - $result['registration_date'] = $event['eventDate']; + $result['registration_date'] = $this->normalizeDate($event['eventDate']); break; case 'last changed': - $result['record_last_updated'] = $event['eventDate']; + $result['record_last_updated'] = $this->normalizeDate($event['eventDate']); break; } } @@ -1507,13 +1507,13 @@ class TldRegistryService $result['whois_server'] = $whoisServer; } if ($lastUpdated) { - $result['record_last_updated'] = $lastUpdated; + $result['record_last_updated'] = $this->normalizeDate($lastUpdated); } if ($registryUrl) { $result['registry_url'] = $registryUrl; } if ($registrationDate) { - $result['registration_date'] = $registrationDate; + $result['registration_date'] = $this->normalizeDate($registrationDate); } return !empty($result) ? $result : null;