[ RFC Index | RFC Search | Usenet FAQs | Web FAQs | Documents | Cities ]

    Search the Archives
Display RFC by number
    


RFC 868: Get the time with PERL:use IO::Socket;sub getTime{ my...

<< Back to: RFC 868

 
Reader comments:
 

Comment by _roro
Submitted on 3/27/2007
Related RFC: RFC 868
Rating: Not yet rated Rate this comment: Vote
Get the time with PERL:use IO::Socket;sub getTime{   my $host = shift;   my $client_socket = new IO::Socket::INET (      PeerAddr => $host,      PeerPort => 37,      Proto => 'tcp')|| return;   my $server_time = <$client_socket>;   $client_socket->close();   my $time = bin2dec($server_time) - 2208988800;   return($time);}############################################################################sub bin2dec{ return unpack("N", pack("a32", shift));}############################################################################

 
 
FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

<< Back to: RFC 868


© 2008 FAQS.ORG. All rights reserved.