Description
Queries the time zones available when creating a tenant in an OceanBase Cloud instance. Returns the default time zone for the current environment and all supported time zone options, each with a description.
Call description
Prerequisites
You need an access key to call the multi-cloud API. For information about how to obtain an AccessKey ID and AccessKey Secret, see Manage access keys.
Request path
GET /api/v2/instances/tenants/timezone
Request parameters
Query
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| requestId | String | Yes | The ID of the request. | d04eabba**** |
Response parameters
| Field | Type | Description | Example value |
|---|---|---|---|
| success | Boolean | Whether the request succeeded. | true |
| errorCode | String | Error code. | INVALID_PARAMETER |
| errorMessage | String | Error message. | Invalid parameter |
| data | Object | Response data. | N/A |
| data.default | String | Default time zone configured for the current region and channel. Use the value returned by the API. | — |
| data.list | Array | List of available time zones. | [{"timeZone":"Asia/Shanghai","description":"(UTC+08:00) Asia/Shanghai"}] |
| data.list[].timeZone | String | Time zone ID. | Asia/Shanghai |
| data.list[].description | String | Time zone description, including the UTC offset calculated for the current date and the zone ID. The offset varies according to daylight saving time rules. | (UTC+08:00) Asia/Shanghai |
| cost | Number | Request duration. | 1.0 |
| server | String | Server address, typically the IP address of an OBServer node. | 10.0.0.10 |
| requestId | String | Request ID. | d04eabba**** |
| totalCount | Number | Total record count. | 100.0 |
| extra | Object | Additional information. | {} |
Examples
Request example
curl --digest -u '<AccessKey ID>:<AccessKey Secret>' -X GET 'https://api-cloud.oceanbase.com/api/v2/instances/tenants/timezone?requestId=d04eabba****' \
-H 'Content-Type: application/json'
Response example
<current-environment-default-time-zone> is a placeholder for the actual value configured for the current region and channel, not a literal value returned by the API. Do not infer the default time zone from the list entries.
JSON format
{
"success": true,
"errorCode": null,
"errorMessage": null,
"data": {
"default": "<current-environment-default-time-zone>",
"list": [
{
"timeZone": "Asia/Shanghai",
"description": "(UTC+08:00) Asia/Shanghai"
}
]
},
"cost": 1.0,
"server": "xxx.xxx.x.xxx:xxx",
"requestId": "d04eabba****",
"totalCount": 100.0,
"extra": {}
}