POST /system/date-time
This resource is used to view or edit the device's date, time, and timezone.
All fields are optional.
If time is the only set field, the date saved will be the current date.
If date is the only set field, the time saved will be the current time.
If timeZone is the only set field, the time will adjust according to the time-zone.
Example:
Initial state :
\tTimeZone : America/New_York
\tTime : 10:00:00\tNew POST to change only the TimeZone for Europe/Paris
\tNew state :
\tTimeZone : Europe/Paris
\tTime : 04:00:00
If this parameter is not in the request, the Application/Json will be chosen by default.
There are multiple possible values (according the resource):
The first two are the most often used.
There are multiple possible values according the resource:
If this parameter is not present during the request, and error 415 Unsupported Media Type will be thrown.
The Content-Length entity-header field indicates the size of the entity-body.
Object Name: DateTime
Property Name | Type | Description | Method |
---|---|---|---|
Time | String | This is the controller clock’s time. The value is represented by the hours, minutes, and seconds all separated by ':'. These three values are essential for the time property. Format : HH: mm: ss |
GET POST |
Date | String | This indicates the current date of the controller. The value is represented by the month, the day and the year all separated with '-'. These three values need to be present for the date property. Format : MM-dd-yyyy |
GET POST |
TimeZone | String | This indicates the time zone the controller is located in. The value need to be one in the list below :
|
GET POST |
ISODateTime | String | This is the time, date and timezone according to the ISO8601 standard. This property can't be combine with other property except with the timezone. The dateTime send will be apply to match the device's timeZone. If a 'Z' is send instead of the timeZone value, it will be like +00:00. Format : yyyy-MM-dd'T'HH: mm: ssZ(Java annotation) Example: Initial State : Device's TimeZone : Europe/Paris Device's Time : 12:00:00 Device's Date : 01-01-2016 Request : {"ISODateTime":"2016-01-15T12:00:00-05:00"} Result : Device's TimeZone : Europe/Paris Device's Time : 18:00:00 Device's Date : 01-15-2016 |
POST |
URL Example: https://0.0.0.0/api/rest/v1/system/date-time
{
"date": "09-21-2011",
"time": "16:00:00",
"timeZone": "America/New_York"
}
URL Example: https://0.0.0.0/api/rest/v1/system/date-time
{
"date": "09-21-2011",
"time": "16:00:00",
"timeZone": "America/New_York"
}
URL Example: https://0.0.0.0/api/rest/v1/system/date-time
<?xml version="1.0" encoding="utf-8"?>
<DateTime>
<ISODateTime>2016-01-15T12:00:00-05:00</ISODateTime>
</DateTime>
URL Example: https://0.0.0.0/api/rest/v1/system/date-time
<?xml version="1.0" encoding="utf-8"?>
<DateTime>
<ISODateTime>2016-01-15T12:00:00-05:00</ISODateTime>
</DateTime>