This service has been deprecated. If you have any concerns or questions, please don't hesitate to contact us in General Discussion at YDN forum.
The getTime service lets you request the current time on the Yahoo! servers. It is a very basic web service that is really handy for building AJAX applications or learning how to work with XML and web services.
Important: getTime is not intended to replace services like NTP. Due to the nature of HTTP requests and our server architecture, getTime will never be exact or definitive for any area except the server it's running on.
See information on constructing REST queries
|appid||string (required)||The application ID. See Application IDs for more information.|
|format||string: (optional) default "unix"||Defines the timestamp format for the call. Accepted values are "unix" to get a unix timestamp and "ms" to get the time in milliseconds.|
|output||string: (optional) default "xml"||Defines the output for the call. Accepted values are "xml", "json" and "php"|
|callback||string: (optional) default ""||The callback parameter has no effect unless output=json
is used. If set, it wraps the JSON object in call to the selected function.
Sample Request Url: http://developer.yahooapis.com/TimeService/V1/getTime?appid=YahooDemo
The schema document for this service response is located at http://developer.yahooapis.com/TimeService/V1/GetTimeResponse.xsd
|Result||Contains the response.|
|Timestamp||The current Yahoo! Server Time is returned in the format specified in the format parameter, as described above. The servers are set to PDT (Pacific Daylight Time) which is UTC-7|
The following is a sample response for a getTime request :
The getTime service returns the standard errors. There are no service-specific errors.