HariSeldon has asked for the wisdom of the Perl Monks concerning the following question:

I'm using Net::EPP 0.27 'Info' command with Perl v5.38.2 to connect to the UK's Nominet servers to retrieve the exact creation date of any particular domain name.

The Nominet specs and Nominet support say that the response should include the full creation timestamp including microseconds in a format such as:

<domain:crDate>2024-04-22T13:11:19.039559Z</domain:crDate>

but my script shows the raw response as being:

<domain:crDate>2024-04-22T14:11:19</domain:crDate>

Note that Net::EPP shows me the time in BST and without the microseconds when the actual creation time is stored by Nominet as UTC/GMT. Can anyone shed any light on whether this is a limitation of Net::EPP or my script or is Nominet mistaken in what their server is responding with?

#!/usr/bin/perl -w use Time::HiRes; use Net::EPP::Client; use Net::EPP::Frame::Command::Info::Domain; use Digest::MD5 qw(md5_hex); init_epp(); get_domain_info("somedomain.co.uk"); sub get_domain_info { my($domain) = (@_); my $info = Net::EPP::Frame::Command::Info::Domain->new; eval { $info->setDomain($domain); $info->clTRID->appendText(md5_hex(Time::HiRes::time().$$)); print_xml($info->toString(1)); $answer = $epp->request($info); print_xml($answer->toString(1)); }; if ($@) { if (ref($@)) { die($@->print()); } else { die(($@)); } } } sub print_xml { my @lines = (@_); my ($result); foreach $line (@lines) { $line =~ s/></>\n</g; $result .= $line; } print "$result\n"; } sub init_epp { # passwords etc redacted my $greeting = $epp->connect(); my $login = Net::EPP::Frame::Command::Login->new; }

Replies are listed 'Best First'.
Re: Net::EPP fractional seconds
by hippo (Archbishop) on May 23, 2024 at 09:36 UTC
    The Nominet specs and Nominet support say that the response should include the full creation timestamp including microseconds in a format such as:

    <domain:crDate>2024-04-22T13:11:19.039559Z</domain:crDate>

    but my script shows the raw response as being:

    <domain:crDate>2024-04-22T14:11:19</domain:crDate>

    I can reproduce the results from your script - the frame comes back with whole seconds only for crDate, exDate and upDate. However, I do not see anywhere in the Nominet docs that they claim anything else. Can you provide a link to the documentation which states that domain:info returns microseconds?


    🦛