提交 b9adacdd 编写于 作者: E ester.zhou

Update docs (10398)

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
......@@ -28,10 +28,12 @@ setDateTime(admin: Want, time: number, callback: AsyncCallback\<void>): void
Sets the system time. This API uses an asynchronous callback to return the result.
**Required permissions**: ohos.permission.EDM_MANAGE_DATETIME
**Required permissions**: ohos.permission.ENTERPRISE_SET_DATETIME
**System capability**: SystemCapability.Customization.EnterpriseDeviceManager
**System API**: This is a system API.
**Parameters**
| Name | Type | Mandatory | Description |
......@@ -40,6 +42,13 @@ Sets the system time. This API uses an asynchronous callback to return the resul
| time | number | Yes| Timestamp (ms).|
| callback | AsyncCallback\<void> | Yes| Callback used to the result. If the system time is set successfully, **err** is **null**; otherwise, **err** is an error object.|
**Error codes**
| Type | Description |
| ------- | ---------------------------------------------------------------------------- |
| 9200001 | The application is not a administrator of the device. |
| 9200002 | The administrator application does not have permission to manage the device. |
**Example**
```js
......@@ -68,10 +77,12 @@ setDateTime(admin: Want, time: number): Promise\<void>
Sets the system time. This API uses a promise to return the result.
**Required permissions**: ohos.permission.EDM_MANAGE_DATETIME
**Required permissions**: ohos.permission.ENTERPRISE_SET_DATETIME
**System capability**: SystemCapability.Customization.EnterpriseDeviceManager
**System API**: This is a system API.
**Parameters**
| Name | Type | Mandatory | Description |
......@@ -85,6 +96,13 @@ Sets the system time. This API uses a promise to return the result.
| ----- | ----------------------------------- |
| Promise\<void> | Promise that returns no value.|
**Error codes**
| Type | Description |
| ------- | ---------------------------------------------------------------------------- |
| 9200001 | The application is not a administrator of the device. |
| 9200002 | The administrator application does not have permission to manage the device. |
**Example**
```js
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部