mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-16 09:37:00 +02:00
Claims create fix
This commit is contained in:
parent
dfb165fb63
commit
a3ad8289c7
2 changed files with 7 additions and 2 deletions
|
@ -1576,8 +1576,8 @@ function processDomainCreate($conn, $db, $xml, $clid, $database_type, $trans, $m
|
|||
':tm_phase' => $launch_phase ?? 'none',
|
||||
':tm_smd_id' => $smd_encodedSignedMark ?? null,
|
||||
':tm_notice_id' => $noticeid ?? null,
|
||||
':tm_notice_accepted' => $accepted ?? null,
|
||||
':tm_notice_expires' => $notafter ?? null
|
||||
':tm_notice_accepted' => normalizeDatetime($accepted) ?? null,
|
||||
':tm_notice_expires' => normalizeDatetime($notafter) ?? null
|
||||
]);
|
||||
|
||||
$domain_id = $db->lastInsertId();
|
||||
|
|
|
@ -1058,3 +1058,8 @@ function ipMatches($ip, $cidr) {
|
|||
|
||||
return ($ipBin & $maskBin) === ($subnetBin & $maskBin);
|
||||
}
|
||||
|
||||
function normalizeDatetime($input) {
|
||||
$dt = DateTime::createFromFormat(DateTime::ATOM, $input); // handles 'T' and 'Z'
|
||||
return $dt ? $dt->format('Y-m-d H:i:s.v') : null; // .v gives milliseconds
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue