Edit a Custom Time Zone
Update the configuration of a custom time zone.
Request URL
POST {base_url}/{api_path}/timezone/update?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| id | Yes | Integer | The unique ID of a time zone. Note: You can query time
zone ID using the Query Time Zone List
interface. |
| name | No | String | The name of the time zone. |
| timezone | No | String | The time zone information, including the UTC offset and identifier. Note: You can query the available time zones using the Get Menu Options interface ( menu set to
timezone). |
| enable_dst | No | Integer | Whether to enable daylight saving time. Valid value:
|
| assign_extension | No | Array<Assign_Ext> | A list of objects assigned to use the time zone. |
- Assign_Ext
-
Parameter Required Type Description type Yes String The type of associated object. Valid value:
extension: Extension.ext_group: Extension group.organization: Organization.
id Yes Integer The ID of the extension, extension group, or organization. Note: You can query the IDs using the following interfaces:- Extension ID: Search Specific Extensions interface
- Extension Group ID: Search Specific Extension Groups interface
- Organization ID: Search Specific Organizations interface
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
| reboot | Integer | Whether a system reboot is required. Note: A system reboot
is required for the custom time zone to take effect. This parameter is fixed to
1 when the creation succeeds.
|
Example
Request example
POST /openapi/v1.0/timezone/update?access_token=gwakjgu9ZBUfz36wql4ndsVKkryI0kdj HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Content-Type: application/json
{
"id": 3,
"name": "Shanghai"
}
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"submsg": "",
"reboot": 0
}