mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-06 01:25:00 +02:00
Fixes for the milliseconds
This commit is contained in:
parent
63aa36ff0a
commit
7f435b6721
5 changed files with 21 additions and 14 deletions
|
@ -199,11 +199,14 @@ function handleDomainQuery($request, $response, $pdo, $domainName) {
|
|||
// Perform the RDAP lookup
|
||||
try {
|
||||
// Query 1: Get domain details
|
||||
$stmt1 = $pdo->prepare("SELECT *, DATE_FORMAT(`crdate`, '%Y-%m-%dT%TZ') AS `crdate`, DATE_FORMAT(`exdate`, '%Y-%m-%dT%TZ') AS `exdate` FROM `registry`.`domain` WHERE `name` = :domain");
|
||||
$stmt1 = $pdo->prepare("SELECT * FROM `registry`.`domain` WHERE `name` = :domain");
|
||||
$stmt1->bindParam(':domain', $domain, PDO::PARAM_STR);
|
||||
$stmt1->execute();
|
||||
$domainDetails = $stmt1->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
$domainDetails['crdate'] = (new DateTime($domainDetails['crdate']))->format('Y-m-d\TH:i:s.v\Z');
|
||||
$domainDetails['exdate'] = (new DateTime($domainDetails['exdate']))->format('Y-m-d\TH:i:s.v\Z');
|
||||
|
||||
// Check if the domain exists
|
||||
if (!$domainDetails) {
|
||||
// Domain not found, respond with a 404 error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue