1# @ohos.systemTime (System Time and Time Zone) 2 3The **systemTime** module provides system time and time zone features. You can use the APIs of this module to set and obtain the system time and time zone. 4 5> **NOTE** 6> 7> - The APIs of this module are deprecated since API version 9. You are advised to use the APIs of the [@ohos.systemDateTime (System Time and Time Zone)](js-apis-system-date-time.md) module. 8> - The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. 9 10## Modules to Import 11 12```js 13import systemTime from '@ohos.systemTime'; 14``` 15 16## systemTime.setTime<sup>(deprecated)</sup> 17 18setTime(time : number, callback : AsyncCallback<void>) : void 19 20Sets the system time. This API uses an asynchronous callback to return the result. 21 22**Required permissions**: ohos.permission.SET_TIME 23 24**System capability**: SystemCapability.MiscServices.Time 25 26**Parameters** 27 28| Name | Type | Mandatory| Description | 29| -------- | ----------- | ---- | ---------------- | 30| time | number | Yes | Timestamp to set, in milliseconds. | 31| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 32 33**Error codes** 34 35For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 36 37| ID| Error Message | 38| -------- | ------------------------------------------------------------ | 39| -1 | The parameter check failed or permission denied or system error. | 40 41**Example** 42 43```js 44// Set the system time to 2021-01-20 02:36:25. 45let time = 1611081385000; 46try { 47 systemTime.setTime(time, (error) => { 48 if (error) { 49 console.info(`Failed to setting time. message: ${error.message}, code: ${error.code}`); 50 return; 51 } 52 console.info(`Succeeded in setting time`); 53 }); 54} catch(e) { 55 console.info(`Failed to set time. message: ${e.message}, code: ${e.code}`); 56} 57``` 58 59## systemTime.setTime 60 61setTime(time : number) : Promise<void> 62 63Sets the system time. This API uses a promise to return the result. 64 65**Required permissions**: ohos.permission.SET_TIME 66 67**System capability**: SystemCapability.MiscServices.Time 68 69**Parameters** 70 71| Name| Type | Mandatory| Description | 72| ------ | ------ | ---- | ------------------ | 73| time | number | Yes | Timestamp to set, in milliseconds.| 74 75**Return value** 76 77| Type | Description | 78| ------------------- | ------------------------- | 79| Promise<void> | Promise that returns no value.| 80 81**Error codes** 82 83For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 84 85| ID| Error Message | 86| -------- | ------------------------------------------------------------ | 87| -1 | The parameter check failed or permission denied or system error. | 88 89**Example** 90 91```js 92// Set the system time to 2021-01-20 02:36:25. 93let time = 1611081385000; 94try { 95 systemTime.setTime(time).then(() => { 96 console.info(`Succeeded in setting time.`); 97 }).catch((error) => { 98 console.info(`Failed to setting time. message: ${error.message}, code: ${error.code}`); 99 }); 100} catch(e) { 101 console.info(`Failed to set time. message: ${e.message}, code: ${e.code}`); 102} 103``` 104 105## systemTime.getCurrentTime<sup>8+</sup> 106 107getCurrentTime(isNano: boolean, callback: AsyncCallback<number>): void 108 109Obtains the time elapsed since the Unix epoch. This API uses an asynchronous callback to return the result. 110 111**System capability**: SystemCapability.MiscServices.Time 112 113**Parameters** 114 115| Name | Type | Mandatory| Description | 116| -------- | -------------- | ---- | ------------------ | 117| isNano | boolean | Yes | Whether the time to return is in nanoseconds.<br>- **true**: in nanoseconds.<br>- **false**: in milliseconds.| 118| callback | AsyncCallback<number> | Yes | Callback used to return the time elapsed since the Unix epoch. | 119 120**Error codes** 121 122For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 123 124| ID| Error Message | 125| -------- | ------------------------------------------- | 126| -1 | The parameter check failed or system error. | 127 128**Example** 129 130```js 131try { 132 systemTime.getCurrentTime(true, (error, time) => { 133 if (error) { 134 console.info(`Failed to getting currentTime. message: ${error.message}, code: ${error.code}`); 135 return; 136 } 137 console.info(`Succeeded in getting currentTime: ${time}`); 138 }); 139} catch(e) { 140 console.info(`Failed to get currentTime. message: ${e.message}, code: ${e.code}`); 141} 142``` 143 144## systemTime.getCurrentTime<sup>8+</sup> 145 146getCurrentTime(callback: AsyncCallback<number>): void 147 148Obtains the time elapsed since the Unix epoch. This API uses an asynchronous callback to return the result. 149 150**System capability**: SystemCapability.MiscServices.Time 151 152**Parameters** 153 154| Name | Type | Mandatory| Description | 155| -------- | ----------- | ---- | ---------------------------------- | 156| callback | AsyncCallback<number> | Yes | Callback used to return the time elapsed since the Unix epoch. | 157 158**Error codes** 159 160For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 161 162| ID| Error Message | 163| -------- | ------------------------------------------- | 164| -1 | The parameter check failed or system error. | 165 166**Example** 167 168```js 169try { 170 systemTime.getCurrentTime((error, time) => { 171 if (error) { 172 console.info(`Failed to getting currentTime. message: ${error.message}, code: ${error.code}`); 173 return; 174 } 175 console.info(`Succeeded in getting currentTime : ${time}`); 176 }); 177} catch(e) { 178 console.info(`Failed to get currentTime. message: ${e.message}, code: ${e.code}`); 179} 180``` 181 182## systemTime.getCurrentTime<sup>8+</sup> 183 184getCurrentTime(isNano?: boolean): Promise<number> 185 186Obtains the time elapsed since the Unix epoch. This API uses a promise to return the result. 187 188**System capability**: SystemCapability.MiscServices.Time 189 190**Parameters** 191 192| Name| Type | Mandatory| Description | 193| ------ | ------- | ---- | ------------------------- | 194| isNano | boolean | No | Whether the time to return is in nanoseconds.<br>- **true**: in nanoseconds.<br>- **false**: in milliseconds.| 195 196**Return value** 197 198| Type | Description | 199| --------------------- | --------------------------- | 200| Promise<number> | Promise used to return the time elapsed since the Unix epoch.| 201 202**Error codes** 203 204For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 205 206| ID| Error Message | 207| -------- | ------------------------------------------- | 208| -1 | The parameter check failed or system error. | 209 210**Example** 211 212```js 213try { 214 systemTime.getCurrentTime().then((time) => { 215 console.info(`Succeeded in getting currentTime : ${time}`); 216 }).catch((error) => { 217 console.info(`Failed to getting currentTime. message: ${error.message}, code: ${error.code}`); 218 }); 219} catch(e) { 220 console.info(`Failed to get currentTime. message: ${e.message}, code: ${e.code}`); 221} 222``` 223 224## systemTime.getRealActiveTime<sup>8+</sup> 225 226getRealActiveTime(isNano: boolean, callback: AsyncCallback<number>): void 227 228Obtains the time elapsed since system startup, excluding the deep sleep time. This API uses an asynchronous callback to return the result. 229 230**System capability**: SystemCapability.MiscServices.Time 231 232**Parameters** 233 234| Name | Type | Mandatory| Description | 235| -------- | ---------- | ---- | -------------------------- | 236| isNano | boolean | Yes | Whether the time to return is in nanoseconds.<br>- **true**: in nanoseconds.<br>- **false**: in milliseconds.| 237| callback | AsyncCallback<number> | Yes | Callback used to return the time.| 238 239**Error codes** 240 241For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 242 243| ID| Error Message | 244| -------- | ------------------------------------------- | 245| -1 | The parameter check failed or system error. | 246 247**Example** 248 249```js 250try { 251 systemTime.getRealActiveTime(true, (error, time) => { 252 if (error) { 253 console.info(`Failed to getting real active time. message: ${error.message}, code: ${error.code}`); 254 return; 255 } 256 console.info(`Succeeded in getting real active time : ${time}`); 257 }); 258} catch(e) { 259 console.info(`Failed to get real active time. message: ${e.message}, code: ${e.code}`); 260} 261``` 262 263## systemTime.getRealActiveTime<sup>8+</sup> 264 265getRealActiveTime(callback: AsyncCallback<number>): void 266 267Obtains the time elapsed since system startup, excluding the deep sleep time. This API uses an asynchronous callback to return the result. 268 269**System capability**: SystemCapability.MiscServices.Time 270 271**Parameters** 272 273| Name | Type | Mandatory| Description | 274| -------- | -------------- | ---- | --------------------- | 275| callback | AsyncCallback<number> | Yes | Callback used to return the time.| 276 277**Error codes** 278 279For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 280 281| ID| Error Message | 282| -------- | ------------------------------------------- | 283| -1 | The parameter check failed or system error. | 284 285**Example** 286 287```js 288try { 289 systemTime.getRealActiveTime((error, time) => { 290 if (error) { 291 console.info(`Failed to getting real active time. message: ${error.message}, code: ${error.code}`); 292 return; 293 } 294 console.info(`Succeeded in getting real active time : ${time}`); 295 }); 296} catch(e) { 297 console.info(`Failed to get real active time. message: ${e.message}, code: ${e.code}`); 298} 299``` 300 301## systemTime.getRealActiveTime<sup>8+</sup> 302 303getRealActiveTime(isNano?: boolean): Promise<number> 304 305Obtains the time elapsed since system startup, excluding the deep sleep time. This API uses a promise to return the result. 306 307**System capability**: SystemCapability.MiscServices.Time 308 309**Parameters** 310 311| Name| Type | Mandatory| Description | 312| ------ | ------- | ---- | ----------------------------------- | 313| isNano | boolean | No | Whether the time to return is in nanoseconds.<br>- **true**: in nanoseconds.<br>- **false**: in milliseconds.| 314 315**Return value** 316 317| Type | Description | 318| -------------- | -------------------------------- | 319| Promise<number> | Promise used to return the time elapsed since system startup, excluding the deep sleep time.| 320 321**Error codes** 322 323For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 324 325| ID| Error Message | 326| -------- | ------------------------------------------- | 327| -1 | The parameter check failed or system error. | 328 329**Example** 330 331```js 332try { 333 systemTime.getRealActiveTime().then((time) => { 334 console.info(`Succeeded in getting real active time : ${time}`); 335 }).catch((error) => { 336 console.info(`Failed to getting real active time. message: ${error.message}, code: ${error.code}`); 337 }); 338} catch(e) { 339 console.info(`Failed to get real active time. message: ${e.message}, code: ${e.code}`); 340} 341``` 342 343## systemTime.getRealTime<sup>8+</sup> 344 345getRealTime(isNano: boolean, callback: AsyncCallback<number>): void 346 347Obtains the time elapsed since system startup, including the deep sleep time. This API uses an asynchronous callback to return the result. 348 349**System capability**: SystemCapability.MiscServices.Time 350 351**Parameters** 352 353| Name | Type | Mandatory| Description | 354| -------- | --------------- | ---- | ------------------------------- | 355| isNano | boolean | Yes | Whether the time to return is in nanoseconds.<br>- **true**: in nanoseconds.<br>- **false**: in milliseconds.| 356| callback | AsyncCallback<number> | Yes | Callback used to return the time. | 357 358**Error codes** 359 360For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 361 362| ID| Error Message | 363| -------- | ------------------------------------------- | 364| -1 | The parameter check failed or system error. | 365 366**Example** 367 368```js 369try { 370 systemTime.getRealTime(true, (error, time) => { 371 if (error) { 372 console.info(`Failed to getting real time. message: ${error.message}, code: ${error.code}`); 373 return; 374 } 375 console.info(`Succeeded in getting real time : ${time}`); 376 }); 377} catch(e) { 378 console.info(`Failed to get real time. message: ${e.message}, code: ${e.code}`); 379} 380``` 381 382## systemTime.getRealTime<sup>8+</sup> 383 384getRealTime(callback: AsyncCallback<number>): void 385 386Obtains the time elapsed since system startup, including the deep sleep time. This API uses an asynchronous callback to return the result. 387 388**System capability**: SystemCapability.MiscServices.Time 389 390**Parameters** 391 392| Name | Type | Mandatory| Description | 393| -------- | --------- | ---- | --------------------------- | 394| callback | AsyncCallback<number> | Yes | Callback used to return the time. | 395 396**Error codes** 397 398For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 399 400| ID| Error Message | 401| -------- | ------------------------------------------- | 402| -1 | The parameter check failed or system error. | 403 404**Example** 405 406```js 407try { 408 systemTime.getRealTime((error, time) => { 409 if (error) { 410 console.info(`Failed to getting real time. message: ${error.message}, code: ${error.code}`); 411 return; 412 } 413 console.info(`Succeeded in getting real time : ${time}`); 414 }); 415} catch(e) { 416 console.info(`Failed to get real time. message: ${e.message}, code: ${e.code}`); 417} 418``` 419 420## systemTime.getRealTime<sup>8+</sup> 421 422getRealTime(isNano?: boolean): Promise<number> 423 424Obtains the time elapsed since system startup, including the deep sleep time. This API uses a promise to return the result. 425 426**System capability**: SystemCapability.MiscServices.Time 427 428**Parameters** 429 430| Name| Type | Mandatory| Description | 431| ------ | ------- | ---- | ------------------------------- | 432| isNano | boolean | No | Whether the time to return is in nanoseconds.<br>- **true**: in nanoseconds.<br>- **false**: in milliseconds.| 433 434**Return value** 435 436| Type | Description | 437| --------------------- | ------------------------------- | 438| Promise<number> | Promise used to return the time elapsed since system startup, including the deep sleep time.| 439 440**Error codes** 441 442For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 443 444| ID| Error Message | 445| -------- | ------------------------------------------- | 446| -1 | The parameter check failed or system error. | 447 448**Example** 449 450```js 451try { 452 systemTime.getRealTime().then((time) => { 453 console.info(`Succeeded in getting real time : ${time}`); 454 }).catch((error) => { 455 console.info(`Failed to getting real time. message: ${error.message}, code: ${error.code}`); 456 }); 457} catch(e) { 458 console.info(`Failed to get real time. message: ${e.message}, code: ${e.code}`); 459} 460``` 461 462## systemTime.setDate 463 464setDate(date: Date, callback: AsyncCallback<void>): void 465 466Sets the system date. This API uses an asynchronous callback to return the result. 467 468**Required permissions**: ohos.permission.SET_TIME 469 470**System capability**: SystemCapability.MiscServices.Time 471 472**Parameters** 473 474| Name | Type | Mandatory| Description | 475| -------- | ------------- | ---- | --------------------- | 476| date | Date | Yes | Target date to set. | 477| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 478 479**Error codes** 480 481For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 482 483| ID| Error Message | 484| -------- | ------------------------------------------------------------ | 485| -1 | The parameter check failed or permission denied or system error. | 486 487**Example** 488 489```js 490let date = new Date(); 491try { 492 systemTime.setDate(date, (error) => { 493 if (error) { 494 console.info(`Failed to setting date. message: ${error.message}, code: ${error.code}`); 495 return; 496 } 497 console.info(`Succeeded in setting date.`); 498 }); 499} catch(e) { 500 console.info(`Failed to set date. message: ${e.message}, code: ${e.code}`); 501} 502``` 503 504## systemTime.setDate 505 506setDate(date: Date): Promise<void> 507 508Sets the system date. This API uses a promise to return the result. 509 510**Required permissions**: ohos.permission.SET_TIME 511 512**System capability**: SystemCapability.MiscServices.Time 513 514**Parameters** 515 516| Name| Type| Mandatory| Description | 517| ------ | ---- | ---- | ---------- | 518| date | Date | Yes | Target date to set.| 519 520**Return value** 521 522| Type | Description | 523| ------------------- | -------------------- | 524| Promise<void> | Promise that returns no value.| 525 526**Error codes** 527 528For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 529 530| ID| Error Message | 531| -------- | ------------------------------------------------------------ | 532| -1 | The parameter check failed or permission denied or system error. | 533 534**Example** 535 536```js 537let date = new Date(); 538try { 539 systemTime.setDate(date).then(() => { 540 console.info(`Succeeded in setting date.`); 541 }).catch((error) => { 542 console.info(`Failed to setting date. message: ${error.message}, code: ${error.code}`); 543 }); 544} catch(e) { 545 console.info(`Failed to set date. message: ${e.message}, code: ${e.code}`); 546} 547``` 548 549## systemTime.getDate<sup>8+</sup> 550 551getDate(callback: AsyncCallback<Date>): void 552 553Obtains the current system date. This API uses an asynchronous callback to return the result. 554 555**System capability**: SystemCapability.MiscServices.Time 556 557**Parameters** 558 559| Name | Type | Mandatory| Description | 560| -------- | -------------- | ---- | --------------------- | 561| callback | AsyncCallback<Date> | Yes | Callback used to return the current system date.| 562 563**Error codes** 564 565For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 566 567| ID| Error Message | 568| -------- | ------------------------------------------- | 569| -1 | The parameter check failed or system error. | 570 571**Example** 572 573```js 574try { 575 systemTime.getDate((error, date) => { 576 if (error) { 577 console.info(`Failed to get date. message: ${error.message}, code: ${error.code}`); 578 return; 579 } 580 console.info(`Succeeded in get date : ${date}`);; 581 }); 582} catch(e) { 583 console.info(`Failed to get date. message: ${e.message}, code: ${e.code}`); 584} 585``` 586 587## systemTime.getDate<sup>8+</sup> 588 589getDate(): Promise<Date> 590 591Obtains the current system date. This API uses a promise to return the result. 592 593**System capability**: SystemCapability.MiscServices.Time 594 595**Return value** 596 597| Type | Description | 598| ------------------- | ----------------------------------------- | 599| Promise<Date> | Promise used to return the current system date.| 600 601**Error codes** 602 603For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 604 605| ID| Error Message | 606| -------- | ------------------------------------------- | 607| -1 | The parameter check failed or system error. | 608 609**Example** 610 611```js 612try { 613 systemTime.getDate().then((date) => { 614 console.info(`Succeeded in getting date : ${date}`); 615 }).catch((error) => { 616 console.info(`Failed to getting date. message: ${error.message}, code: ${error.code}`); 617 }); 618} catch(e) { 619 console.info(`Failed to get date. message: ${e.message}, code: ${e.code}`); 620} 621``` 622 623## systemTime.setTimezone 624 625setTimezone(timezone: string, callback: AsyncCallback<void>): void 626 627Sets the system time zone. This API uses an asynchronous callback to return the result. 628 629**Required permissions**: ohos.permission.SET_TIME_ZONE 630 631**System capability**: SystemCapability.MiscServices.Time 632 633**Parameters** 634 635| Name | Type | Mandatory| Description | 636| -------- | ------------- | ---- | -------------------------- | 637| timezone | string | Yes | System time zone to set. For details, see [Supported System Time Zones](#supported-system-time-zones). | 638| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 639 640**Error codes** 641 642For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 643 644| ID| Error Message | 645| -------- | ------------------------------------------------------------ | 646| -1 | The parameter check failed or permission denied or system error. | 647 648**Example** 649 650```js 651try { 652 systemTime.setTimezone('Asia/Shanghai', (error) => { 653 if (error) { 654 console.info(`Failed to setting timezone. message: ${error.message}, code: ${error.code}`); 655 return; 656 } 657 console.info(`Succeeded in setting timezone.`); 658 }); 659} catch(e) { 660 console.info(`Failed to set timezone. message: ${e.message}, code: ${e.code}`); 661} 662``` 663 664## systemTime.setTimezone 665 666setTimezone(timezone: string): Promise<void> 667 668Sets the system time zone. This API uses a promise to return the result. 669 670**Required permissions**: ohos.permission.SET_TIME_ZONE 671 672**System capability**: SystemCapability.MiscServices.Time 673 674**Parameters** 675 676| Name | Type | Mandatory| Description | 677| -------- | ------ | ---- | ---------- | 678| timezone | string | Yes | System time zone to set. For details, see [Supported System Time Zones](#supported-system-time-zones).| 679 680**Return value** 681 682| Type | Description | 683| ------------------- | -------------------- | 684| Promise<void> | Promise that returns no value.| 685 686**Error codes** 687 688For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 689 690| ID| Error Message | 691| -------- | ------------------------------------------------------------ | 692| -1 | The parameter check failed or permission denied or system error. | 693 694**Example** 695 696```js 697try { 698 systemTime.setTimezone('Asia/Shanghai').then(() => { 699 console.info(`Succeeded in setting timezone.`); 700 }).catch((error) => { 701 console.info(`Failed to setting timezone. message: ${error.message}, code: ${error.code}`); 702 }); 703} catch(e) { 704 console.info(`Failed to set timezone. message: ${e.message}, code: ${e.code}`); 705} 706``` 707 708## systemTime.getTimezone<sup>8+</sup> 709 710getTimezone(callback: AsyncCallback<string>): void 711 712Obtains the system time zone. This API uses an asynchronous callback to return the result. 713 714**System capability**: SystemCapability.MiscServices.Time 715 716**Parameters** 717 718| Name | Type | Mandatory| Description | 719| -------- | --------- | ---- | ------------------------ | 720| callback | AsyncCallback<string> | Yes | Callback used to return the system time zone. For details, see [Supported System Time Zones](#supported-system-time-zones).| 721 722**Error codes** 723 724For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 725 726| ID| Error Message | 727| -------- | ------------------------------------------- | 728| -1 | The parameter check failed or system error. | 729 730**Example** 731 732```js 733try { 734 systemTime.getTimezone((error, data) => { 735 if (error) { 736 console.info(`Failed to get timezone. message: ${error.message}, code: ${error.code}`); 737 return; 738 } 739 console.info(`Succeeded in get timezone : ${data}`); 740 }); 741} catch(e) { 742 console.info(`Failed to get timezone. message: ${e.message}, code: ${e.code}`); 743} 744``` 745 746## systemTime.getTimezone<sup>8+</sup> 747 748getTimezone(): Promise<string> 749 750Obtains the system time zone. This API uses a promise to return the result. 751 752**System capability**: SystemCapability.MiscServices.Time 753 754**Return value** 755 756| Type | Description | 757| --------------------- | ------------------------------------- | 758| Promise<string> | Promise used to return the system time zone. For details, see [Supported System Time Zones](#supported-system-time-zones).| 759 760**Error codes** 761 762For details about the error codes, see [Time and Time Zone Service Error Codes](../errorcodes/errorcode-time.md). 763 764| ID| Error Message | 765| -------- | ------------------------------------------- | 766| -1 | The parameter check failed or system error. | 767 768**Example** 769 770```js 771try { 772 systemTime.getTimezone().then((data) => { 773 console.info(`Succeeded in getting timezone: ${data}`); 774 }).catch((error) => { 775 console.info(`Failed to getting timezone. message: ${error.message}, code: ${error.code}`); 776 }); 777} catch(e) { 778 console.info(`Failed to get timezone. message: ${e.message}, code: ${e.code}`); 779} 780``` 781 782## Supported System Time Zones 783 784The following table lists the supported system time zones and the respective offset (unit: h) between each time zone and time zone 0. 785 786| Time Zone | Offset | 787| ------------------------------ | --------------------- | 788| Antarctica/McMurdo | 12 | 789| America/Argentina/Buenos_Aires | -3 | 790| Australia/Sydney | 10 | 791| America/Noronha | -2 | 792| America/St_Johns | -3 | 793| Africa/Kinshasa | 1 | 794| America/Santiago | -3 | 795| Asia/Shanghai | 8 | 796| Asia/Nicosia | 3 | 797| Europe/Berlin | 2 | 798| America/Guayaquil | -5 | 799| Europe/Madrid | 2 | 800| Pacific/Pohnpei | 11 | 801| America/Godthab | -2 | 802| Asia/Jakarta | 7 | 803| Pacific/Tarawa | 12 | 804| Asia/Almaty | 6 | 805| Pacific/Majuro | 12 | 806| Asia/Ulaanbaatar | 8 | 807| America/Mexico_City | -5 | 808| Asia/Kuala_Lumpur | 8 | 809| Pacific/Auckland | 12 | 810| Pacific/Tahiti | -10 | 811| Pacific/Port_Moresby | 10 | 812| Asia/Gaza | 3 | 813| Europe/Lisbon | 1 | 814| Europe/Moscow | 3 | 815| Europe/Kiev | 3 | 816| Pacific/Wake | 12 | 817| America/New_York | -4 | 818| Asia/Tashkent | 5 | 819