XML-RPC interface for Current Time
Bridging RFC 868 and XML-RPC
The US National Institute of Standards operates several servers that return the current date-time, expressed in seconds since January 1, 1900. These servers use a protocol defined by RFC 868. It was a simple matter to create a Frontier verb that calls this server and sets the clock.
We call the NIST server on our server once every 24 hours, at midnight Pacific.
The next step was to implement an XML-RPC interface, so that people using tools that support XML-RPC but do not have scriptable access to RFC 868 could get the results of the NIST network.
This server does not account for network latency, there's no fancy code to try to predict how long the response will take to get back to you. Calls can take less than a second over a random Internet path, but as always your mileage may vary. Please report your experience, let's learn more about how this stuff works.
Note: There's also a SOAP 1.1 interface for Current Time.
currentTime.getCurrentTime () returns date/time
To get the current time, call currentTime.getCurrentTime on time.xmlrpc.com, port 80, path /RPC2.
The call takes no parameters.
It returns the current time as a date/time.
Request and Response
Here's an example of a call and a response.
POST /RPC2 HTTP/1.0
User-Agent: Radio UserLand/7.1b7 (WinNT)
HTTP/1.1 200 OK
Date: Wed, 03 Oct 2001 15:53:38 GMT
Server: UserLand Frontier/7.0.1-WinNT