5.1.7 api system timezone

The /api/system/timezone function is used for obtaining information on the device time zone or for time zone setting.

You can use the GET method for data retrieval and the PUT method for configuration upload.

GET method

The function is part of the System service and the user has to be assigned the System (Monitoring) privilege for authentication if required.

No parameters are defined for the GET method.

The response is in the application/json format and includes information on whether the zone has been set automatically and what time zone has been set. In case the time zone has been set manually, the custom parameter shows the zone creating rule.

Example:

GET /api/system/timezone
{
    "success": true,
    "result": {
        "automatic": true,
        "zone": "America/Los Angeles"
    }
}
nebo
{
    "success": true,
    "result": {
        "automatic": false
        "zone": "custom",
        "custom": "UTC-08:00"
    }
}

PUT method

The function is part of the System service and the user has to be assigned the System (Control) privilege for authentication if required.

Request parameters for PUT:

Parametr

Popis

automatic

0 or 1

If true (1) is completed, no more parameters are entered.

zone

Define the zone: enter either the zone name or "custom" for manual setting.

Refer to the zone name list on the 5.1.8 api system timezone caps endpoint.

custom

Define the zone by writing UTC−08:00, UTC+03:00, etc.

Available for zone="custom" only.

Example:

PUT /api/system/timezone?automatic=0&zone=custom&custom=UTC-08:00
{
  "success" : true
}