EMI.SYS.DATETIME

September 20th, 2009 Leave a comment Go to comments

This method is used to set and get time of the system. If issued without any parameters then the current date/time of the system is returned. If any parameter is present, then system data is adjusted. It is possible to supply part of the parameters and they should be adjusted while remaining should be untouched. When some parameters are supplied then the new system data has to be returned.

Request Parameters

Name Type Mandatory Description
session JSON String yes Session ID
date JSON String no Specify system date in format yyyy-mm-dd
time JSON String no Specify system time (24h) in format hh:mm:ss

Response

Name Type Description
date JSON Array System date in format yyyy-mm-dd
time JSON Array System time (24h) in format hh:mm:ss

Error Codes

Reference Description
EOK No errors (contains warnings)
EBADPARAM Error in parameters
EGENERAL Some other error
ESESSION Session with the given ID is not found

Examples

Request to EMI-RPC Server:

{
 "EMI-RPC": "1.0", "id": 1,
 "method": "emi.sys.datetime",
 "params": {
	"session":"some_session_id",
	"date":"1980-07-15",
	"time":"22:59:59"
	}
}

Response from EMI-RPC Server:

{
 "EMI-RPC": "1.0",
 "id": 1,
 "result":
	{
	"date":"1980-07-15",
	"time":"22:59:59"
	}
}
  1. No comments yet.
  1. No trackbacks yet.