未验证 提交 4a692a8e 编写于 作者: O openharmony_ci 提交者: Gitee

!11563 翻译完成 10398

Merge pull request !11563 from ester.zhou/TR-10398
...@@ -28,10 +28,12 @@ setDateTime(admin: Want, time: number, callback: AsyncCallback\<void>): void ...@@ -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. 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 capability**: SystemCapability.Customization.EnterpriseDeviceManager
**System API**: This is a system API.
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
...@@ -40,6 +42,13 @@ Sets the system time. This API uses an asynchronous callback to return the resul ...@@ -40,6 +42,13 @@ Sets the system time. This API uses an asynchronous callback to return the resul
| time | number | Yes| Timestamp (ms).| | 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.| | 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** **Example**
```js ```js
...@@ -68,10 +77,12 @@ setDateTime(admin: Want, time: number): Promise\<void> ...@@ -68,10 +77,12 @@ setDateTime(admin: Want, time: number): Promise\<void>
Sets the system time. This API uses a promise to return the result. 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 capability**: SystemCapability.Customization.EnterpriseDeviceManager
**System API**: This is a system API.
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
...@@ -85,6 +96,13 @@ Sets the system time. This API uses a promise to return the result. ...@@ -85,6 +96,13 @@ Sets the system time. This API uses a promise to return the result.
| ----- | ----------------------------------- | | ----- | ----------------------------------- |
| Promise\<void> | Promise that returns no value.| | 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** **Example**
```js ```js
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册