diff --git a/api/@ohos.systemTime.d.ts b/api/@ohos.systemTime.d.ts index ef8856074dcafb4a0be901e19ee73cccc5492e30..4482eff9adbaf6f5bc9a462bfdb1e6c63df8bb21 100755 --- a/api/@ohos.systemTime.d.ts +++ b/api/@ohos.systemTime.d.ts @@ -27,6 +27,9 @@ declare namespace systemTime { * @permission ohos.permission.SET_TIME * @param time Target time stamp (ms) * @since 7 + * @throws {BusinessError} if process failed + * @errorcode 201 Permission verification failed + * @errorcode 401 parameter error */ function setTime(time : number, callback : AsyncCallback) : void; function setTime(time : number) : Promise; @@ -60,6 +63,9 @@ declare namespace systemTime { * @permission ohos.permission.SET_TIME * @param date The target date * @since 7 + * @throws {BusinessError} if process failed + * @errorcode 201 Permission verification failed + * @errorcode 401 parameter error */ function setDate(date: Date, callback: AsyncCallback): void; function setDate(date: Date): Promise; @@ -76,14 +82,17 @@ declare namespace systemTime { * @permission ohos.permission.SET_TIME_ZONE * @param timezone The system time zone * @since 7 + * @throws {BusinessError} if process failed + * @errorcode 201 Permission verification failed + * @errorcode 401 parameter error */ function setTimezone(timezone: string, callback: AsyncCallback): void; function setTimezone(timezone: string): Promise; - /** + /** * Obtains the system time zone. * @since 8 - */ + */ function getTimezone(callback: AsyncCallback): void; function getTimezone(): Promise; }