in reply to Getting date and time from other computer

Some computers offer a "daytime" service on port 13, which just prints the current time. Opening a TCP connection and reading the response should do in that case.

A better way to obtain the time and synchronize clocks is to install a ntpdate server on the remote machine and an ntpdate client on the local machine - most clients offer an option to just obtain the remote time without modifying the local clock.

In either case the remote machine has to fulfill some constraints, so either it must do so already, or you need to have administrative access.

Perl 6 - links to (nearly) everything that is Perl 6.
  • Comment on Re: Getting date and time from other computer