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; }

In reply to Net::EPP fractional seconds by HariSeldon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.