js-apis-system-time.md 18.7 KB
Newer Older
E
ester.zhou 已提交
1
# System Time and Time Zone
Z
zengyawen 已提交
2

E
ester.zhou 已提交
3
The **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.
Z
zengyawen 已提交
4

E
ester.zhou 已提交
5
> **NOTE**
E
ester.zhou 已提交
6 7
>
> - 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.
Z
zengyawen 已提交
8

W
wusongqing 已提交
9
## Modules to Import
Z
zengyawen 已提交
10

E
ester.zhou 已提交
11

Z
zengyawen 已提交
12 13 14 15 16
```
import systemTime from '@ohos.systemTime';
```


W
wusongqing 已提交
17
## systemTime.setTime
Z
zengyawen 已提交
18

W
wusongqing 已提交
19 20 21 22 23 24
setTime(time : number, callback : AsyncCallback<void>) : void

Sets the system time. This API uses an asynchronous callback to return the result.

**Required permissions**: ohos.permission.SET_TIME

E
ester.zhou 已提交
25
**System capability**: SystemCapability.MiscServices.Time
W
wusongqing 已提交
26

E
ester.zhou 已提交
27
**Parameters**
W
wusongqing 已提交
28

E
ester.zhou 已提交
29 30 31 32
| Name  | Type                     | Mandatory| Description                                      |
| -------- | ------------------------- | ---- | ------------------------------------------ |
| time     | number                    | Yes  | Timestamp to set, in milliseconds. |
| callback | AsyncCallback<void> | Yes  | Callback used to return the result.|
E
ester.zhou 已提交
33 34 35 36

**Example**

  ```js
E
ester.zhou 已提交
37
  // Set the system time to 2021-01-20 02:36:25.
W
wusongqing 已提交
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
  var time = 1611081385000;
  systemTime.setTime(time, (error, data) => {
      if (error) {
          console.error(`failed to systemTime.setTime because ` + JSON.stringify(error));
          return;
      }
      console.log(`systemTime.setTime success data : ` + JSON.stringify(data));
  });
  ```


## systemTime.setTime

setTime(time : number) : Promise<void>

Sets the system time. This API uses a promise to return the result.

**Required permissions**: ohos.permission.SET_TIME

E
ester.zhou 已提交
57
**System capability**: SystemCapability.MiscServices.Time
W
wusongqing 已提交
58

E
ester.zhou 已提交
59
**Parameters**
W
wusongqing 已提交
60

E
ester.zhou 已提交
61 62
| Name| Type  | Mandatory| Description              |
| ------ | ------ | ---- | ------------------ |
E
ester.zhou 已提交
63
| time   | number | Yes  | Timestamp to set, in milliseconds.|
W
wusongqing 已提交
64

E
ester.zhou 已提交
65 66
**Return value**

E
ester.zhou 已提交
67 68
| Type               | Description                |
| ------------------- | -------------------- |
E
ester.zhou 已提交
69 70 71 72 73
| Promise<void> | Promise used to return the result.|

**Example**

  ```js
E
ester.zhou 已提交
74 75 76 77 78 79 80
  // Set the system time to 2021-01-20 02:36:25.
  var time = 1611081385000;
  systemTime.setTime(time).then((data) => {
      console.log(`systemTime.setTime success data : ` + JSON.stringify(data));
  }).catch((error) => {
      console.error(`failed to systemTime.setTime because ` + JSON.stringify(error));
  });
W
wusongqing 已提交
81 82 83 84 85
  ```


## systemTime.getCurrentTime<sup>8+</sup>

E
ester.zhou 已提交
86
getCurrentTime(isNano: boolean, callback: AsyncCallback&lt;number&gt;): void
W
wusongqing 已提交
87 88 89

Obtains the time elapsed since the Unix epoch. This API uses an asynchronous callback to return the result.

E
ester.zhou 已提交
90
**System capability**: SystemCapability.MiscServices.Time
W
wusongqing 已提交
91

E
ester.zhou 已提交
92
**Parameters**
W
wusongqing 已提交
93

E
ester.zhou 已提交
94 95
| Name  | Type                       | Mandatory| Description                                                        |
| -------- | --------------------------- | ---- | ------------------------------------------------------------ |
E
ester.zhou 已提交
96
| isNano   | boolean                     | Yes  | Whether the time to return is in nanoseconds.<br>- **true**: in nanoseconds.<br>- **false**: in milliseconds. |
E
ester.zhou 已提交
97
| callback | AsyncCallback&lt;number&gt; | Yes  | Callback used to return the time.        |
E
ester.zhou 已提交
98 99 100 101

**Example**

  ```js
W
wusongqing 已提交
102 103 104 105 106 107 108 109 110 111
  systemTime.getCurrentTime(true, (error, data) => {
      if (error) {
          console.error(`failed to systemTime.getCurrentTime because ` + JSON.stringify(error));
          return;
      }
      console.log(`systemTime.getCurrentTime success data : ` + JSON.stringify(data));
  });
  ```


E
ester.zhou 已提交
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
## systemTime.getCurrentTime<sup>8+</sup>

getCurrentTime(callback: AsyncCallback&lt;number&gt;): void

Obtains the time elapsed since the Unix epoch. This API uses an asynchronous callback to return the result.

**System capability**: SystemCapability.MiscServices.Time

**Parameters**

| Name  | Type                       | Mandatory| Description                                                        |
| -------- | --------------------------- | ---- | ------------------------------------------------------------ |
| callback | AsyncCallback&lt;number&gt; | Yes  | Callback used to return the time.        |

**Example**

  ```js
  systemTime.getCurrentTime((error, data) => {
      if (error) {
          console.error(`failed to systemTime.getCurrentTime because ` + JSON.stringify(error));
          return;
      }
      console.log(`systemTime.getCurrentTime success data : ` + JSON.stringify(data));
  });
  ```


W
wusongqing 已提交
139 140 141 142 143 144
## systemTime.getCurrentTime<sup>8+</sup>

getCurrentTime(isNano?: boolean): Promise&lt;number&gt;

Obtains the time elapsed since the Unix epoch. This API uses a promise to return the result.

E
ester.zhou 已提交
145
**System capability**: SystemCapability.MiscServices.Time
W
wusongqing 已提交
146

E
ester.zhou 已提交
147
**Parameters**
W
wusongqing 已提交
148

E
ester.zhou 已提交
149 150
| Name| Type   | Mandatory| Description                                                        |
| ------ | ------- | ---- | ------------------------------------------------------------ |
E
ester.zhou 已提交
151
| isNano | boolean | No  | Whether the time to return is in nanoseconds.<br/>- **true**: in nanoseconds.<br>- **false**: in milliseconds. |
W
wusongqing 已提交
152

E
ester.zhou 已提交
153 154
**Return value**

E
ester.zhou 已提交
155 156
| Type                 | Description                                                        |
| --------------------- | ------------------------------------------------------------ |
E
ester.zhou 已提交
157 158 159 160 161
| Promise&lt;number&gt; | Promise used to return the time.|

**Example**

  ```js
W
wusongqing 已提交
162 163 164 165 166 167 168 169 170 171
  systemTime.getCurrentTime().then((data) => {
      console.log(`systemTime.getCurrentTime success data : ` + JSON.stringify(data));
  }).catch((error) => {
      console.error(`failed to systemTime.getCurrentTime because ` + JSON.stringify(error));
  });
  ```


## systemTime.getRealActiveTime<sup>8+</sup>

E
ester.zhou 已提交
172
getRealActiveTime(isNano: boolean, callback: AsyncCallback&lt;number&gt;): void
W
wusongqing 已提交
173 174 175

Obtains the time elapsed since system start, excluding the deep sleep time. This API uses an asynchronous callback to return the result.

E
ester.zhou 已提交
176
**System capability**: SystemCapability.MiscServices.Time
W
wusongqing 已提交
177

E
ester.zhou 已提交
178
**Parameters**
W
wusongqing 已提交
179

E
ester.zhou 已提交
180 181
| Name  | Type                       | Mandatory| Description                                                        |
| -------- | --------------------------- | ---- | ------------------------------------------------------------ |
E
ester.zhou 已提交
182
| isNano   | boolean                     | Yes  | Whether the time to return is in nanoseconds.<br/>- **true**: in nanoseconds.<br>- **false**: in milliseconds. |
E
ester.zhou 已提交
183
| callback | AsyncCallback&lt;number&gt; | Yes  | Callback used to return the time.|
E
ester.zhou 已提交
184 185 186 187

**Example**

  ```js
W
wusongqing 已提交
188 189 190 191 192 193 194 195 196 197
  systemTime.getRealActiveTime(true, (error, data) => {
      if (error) {
          console.error(`failed to systemTime.getRealActiveTimebecause ` + JSON.stringify(error));
          return;
      }
      console.log(`systemTime.getRealActiveTime success data : ` + JSON.stringify(data));
  });
  ```


E
ester.zhou 已提交
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
## systemTime.getRealActiveTime<sup>8+</sup>

getRealActiveTime(callback: AsyncCallback&lt;number&gt;): void

Obtains the time elapsed since system start, excluding the deep sleep time. This API uses an asynchronous callback to return the result.

**System capability**: SystemCapability.MiscServices.Time

**Parameters**

| Name  | Type                       | Mandatory| Description                                                        |
| -------- | --------------------------- | ---- | ------------------------------------------------------------ |
| callback | AsyncCallback&lt;number&gt; | Yes  | Callback used to return the time.|

**Example**

  ```js
  systemTime.getRealActiveTime((error, data) => {
      if (error) {
          console.error(`failed to systemTime.getRealActiveTimebecause ` + JSON.stringify(error));
          return;
      }
      console.log(`systemTime.getRealActiveTime success data : ` + JSON.stringify(data));
  });
  ```


W
wusongqing 已提交
225 226 227 228 229 230
## systemTime.getRealActiveTime<sup>8+</sup>

getRealActiveTime(isNano?: boolean): Promise&lt;number&gt;

Obtains the time elapsed since system start, excluding the deep sleep time. This API uses a promise to return the result.

E
ester.zhou 已提交
231
**System capability**: SystemCapability.MiscServices.Time
W
wusongqing 已提交
232

E
ester.zhou 已提交
233
**Parameters**
W
wusongqing 已提交
234

E
ester.zhou 已提交
235 236
| Name| Type   | Mandatory| Description                                                        |
| ------ | ------- | ---- | ------------------------------------------------------------ |
E
ester.zhou 已提交
237
| isNano | boolean | No  | Whether the time to return is in nanoseconds.<br/>- **true**: in nanoseconds.<br>- **false**: in milliseconds. |
W
wusongqing 已提交
238

E
ester.zhou 已提交
239 240
**Return value**

E
ester.zhou 已提交
241 242
| Type                 | Description                                                        |
| --------------------- | ------------------------------------------------------------ |
E
ester.zhou 已提交
243 244 245 246 247
| Promise&lt;number&gt; | Promise used to return the time.|

**Example**

  ```js
E
ester.zhou 已提交
248
  systemTime.getRealActiveTime().then((data) => {
W
wusongqing 已提交
249 250 251 252 253 254 255 256 257
      console.log(`systemTime.getRealActiveTime success data : ` + JSON.stringify(data));
  }).catch((error) => {
      console.error(`failed to systemTime.getRealActiveTime because ` + JSON.stringify(error));
  });
  ```


## systemTime.getRealTime<sup>8+</sup>

E
ester.zhou 已提交
258
getRealTime(isNano: boolean, callback: AsyncCallback&lt;number&gt;): void
W
wusongqing 已提交
259 260 261

Obtains the time elapsed since system start, including the deep sleep time. This API uses an asynchronous callback to return the result.

E
ester.zhou 已提交
262
**System capability**: SystemCapability.MiscServices.Time
W
wusongqing 已提交
263

E
ester.zhou 已提交
264
**Parameters**
W
wusongqing 已提交
265

E
ester.zhou 已提交
266 267
| Name  | Type                       | Mandatory| Description                                                        |
| -------- | --------------------------- | ---- | ------------------------------------------------------------ |
E
ester.zhou 已提交
268
| isNano   | boolean                     | Yes  | Whether the time to return is in nanoseconds.<br/>- **true**: in nanoseconds.<br>- **false**: in milliseconds. |
E
ester.zhou 已提交
269
| callback | AsyncCallback&lt;number&gt; | Yes  | Callback used to return the time.  |
E
ester.zhou 已提交
270 271 272 273

**Example**

  ```js
W
wusongqing 已提交
274 275 276 277 278 279 280 281 282 283 284 285
  systemTime.getRealTime(true, (error, data) => {
      if (error) {
          console.error(`failed to systemTime.getRealTime because ` + JSON.stringify(error));
          return;
      }
      console.log(`systemTime.getRealTime success data: ` + JSON.stringify(data));
  });
  ```


## systemTime.getRealTime<sup>8+</sup>

E
ester.zhou 已提交
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311
getRealTime(callback: AsyncCallback&lt;number&gt;): void

Obtains the time elapsed since system start, including the deep sleep time. This API uses an asynchronous callback to return the result.

**System capability**: SystemCapability.MiscServices.Time

**Parameters**

| Name  | Type                       | Mandatory| Description                                                        |
| -------- | --------------------------- | ---- | ------------------------------------------------------------ |
| callback | AsyncCallback&lt;number&gt; | Yes  | Callback used to return the time.  |

**Example**

  ```js
  systemTime.getRealTime((error, data) => {
      if (error) {
          console.error(`failed to systemTime.getRealTime because ` + JSON.stringify(error));
          return;
      }
      console.log(`systemTime.getRealTime success data: ` + JSON.stringify(data));
  });
  ```

## systemTime.getRealTime<sup>8+</sup>

E
ester.zhou 已提交
312
getRealTime(isNano?: boolean): Promise&lt;number&gt;
W
wusongqing 已提交
313 314 315

Obtains the time elapsed since system start, including the deep sleep time. This API uses a promise to return the result.

E
ester.zhou 已提交
316
**System capability**: SystemCapability.MiscServices.Time
W
wusongqing 已提交
317

E
ester.zhou 已提交
318
**Parameters**
W
wusongqing 已提交
319

E
ester.zhou 已提交
320 321
| Name| Type   | Mandatory| Description                                                        |
| ------ | ------- | ---- | ------------------------------------------------------------ |
E
ester.zhou 已提交
322
| isNano | boolean | No  | Whether the time to return is in nanoseconds.<br/>- **true**: in nanoseconds.<br>- **false**: in milliseconds. |
W
wusongqing 已提交
323

E
ester.zhou 已提交
324 325
**Return value**

E
ester.zhou 已提交
326 327
| Type                 | Description                                                        |
| --------------------- | ------------------------------------------------------------ |
E
ester.zhou 已提交
328 329 330 331 332
| Promise&lt;number&gt; | Promise used to return the time.|

**Example**

  ```js
W
wusongqing 已提交
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348
  systemTime.getRealTime().then((data) => {
      console.log(`systemTime.getRealTime success data: ` + JSON.stringify(data));
  }).catch((error) => {
      console.error(`failed to systemTime.getRealTime because ` + JSON.stringify(error));
  });
  ```


## systemTime.setDate

setDate(date: Date, callback: AsyncCallback&lt;void&gt;): void

Sets the system date. This API uses an asynchronous callback to return the result.

**Required permissions**: ohos.permission.SET_TIME

E
ester.zhou 已提交
349
**System capability**: SystemCapability.MiscServices.Time
W
wusongqing 已提交
350

E
ester.zhou 已提交
351
**Parameters**
W
wusongqing 已提交
352

E
ester.zhou 已提交
353 354 355 356
| Name  | Type                     | Mandatory| Description                                      |
| -------- | ------------------------- | ---- | ------------------------------------------ |
| date     | Date                      | Yes  | Target date to set.                                |
| callback | AsyncCallback&lt;void&gt; | Yes  | Callback used to return the result.|
E
ester.zhou 已提交
357 358 359 360

**Example**

  ```js
E
ester.zhou 已提交
361
  var data = new Date();
W
wusongqing 已提交
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379
  systemTime.setDate(data,(error, data) => {       
      if (error) {            
      console.error('failed to systemTime.setDate because ' + JSON.stringify(error));           
      return;       
  }        
      console.info('systemTime.setDate success data : ' + JSON.stringify(data));    
  });
  ```


## systemTime.setDate

setDate(date: Date): Promise&lt;void&gt;

Sets the system date. This API uses a promise to return the result.

**Required permissions**: ohos.permission.SET_TIME

E
ester.zhou 已提交
380
**System capability**: SystemCapability.MiscServices.Time
W
wusongqing 已提交
381

E
ester.zhou 已提交
382
**Parameters**
W
wusongqing 已提交
383

E
ester.zhou 已提交
384 385 386
| Name| Type| Mandatory| Description      |
| ------ | ---- | ---- | ---------- |
| date   | Date | Yes  | Target date to set.|
W
wusongqing 已提交
387

E
ester.zhou 已提交
388 389
**Return value**

E
ester.zhou 已提交
390 391
| Type               | Description                |
| ------------------- | -------------------- |
E
ester.zhou 已提交
392 393 394 395 396
| Promise&lt;void&gt; | Promise used to return the result.|

**Example**

  ```js
E
ester.zhou 已提交
397
  var data = new Date(); 
W
wusongqing 已提交
398 399 400 401 402 403 404 405 406 407 408 409 410 411
  systemTime.setDate(data).then((value) => {        
      console.log(`systemTime.setDate success data : ` + JSON.stringify(value));    
  }).catch((error) => {        
      console.error(`failed to systemTime.setDate because: ` + JSON.stringify(error));
  });
  ```


## systemTime.getDate<sup>8+</sup>

getDate(callback: AsyncCallback&lt;Date&gt;): void

Obtains the current system date. This API uses an asynchronous callback to return the result.

E
ester.zhou 已提交
412
**System capability**: SystemCapability.MiscServices.Time
W
wusongqing 已提交
413

E
ester.zhou 已提交
414
**Parameters**
W
wusongqing 已提交
415

E
ester.zhou 已提交
416 417 418
| Name  | Type                     | Mandatory| Description                        |
| -------- | ------------------------- | ---- | ---------------------------- |
| callback | AsyncCallback&lt;Date&gt; | Yes  | Callback used to return the current system date.|
E
ester.zhou 已提交
419 420 421 422

**Example**

  ```js
W
wusongqing 已提交
423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438
  systemTime.getDate((error, data) => {
      if (error) {
          console.error(`failed to systemTime.getDate because ` + JSON.stringify(error));
          return;
      }
      console.log(`systemTime.getDate success data : ` + JSON.stringify(data));
  });
  ```


## systemTime.getDate<sup>8+</sup>

getDate(): Promise&lt;Date&gt;

Obtains the current system date. This API uses a promise to return the result.

E
ester.zhou 已提交
439
**System capability**: SystemCapability.MiscServices.Time
W
wusongqing 已提交
440

E
ester.zhou 已提交
441
**Return value**
W
wusongqing 已提交
442

E
ester.zhou 已提交
443 444
| Type               | Description                                     |
| ------------------- | ----------------------------------------- |
E
ester.zhou 已提交
445 446 447 448 449
| Promise&lt;Date&gt; | Promise used to return the current system date.|

**Example**

  ```js
W
wusongqing 已提交
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465
  systemTime.getDate().then((data) => {
      console.log(`systemTime.getDate success data : ` + JSON.stringify(data));
  }).catch((error) => {
      console.error(`failed to systemTime.getDate because ` + JSON.stringify(error));
  });
  ```


## systemTime.setTimezone

setTimezone(timezone: string, callback: AsyncCallback&lt;void&gt;): void

Sets the system time zone. This API uses an asynchronous callback to return the result.

**Required permissions**: ohos.permission.SET_TIME_ZONE

E
ester.zhou 已提交
466
**System capability**: SystemCapability.MiscServices.Time
W
wusongqing 已提交
467

E
ester.zhou 已提交
468
**Parameters**
W
wusongqing 已提交
469

E
ester.zhou 已提交
470 471 472 473
| Name  | Type                     | Mandatory| Description                                      |
| -------- | ------------------------- | ---- | ------------------------------------------ |
| timezone | string                    | Yes  | System time zone to set.                                |
| callback | AsyncCallback&lt;void&gt; | Yes  | Callback used to return the result.|
E
ester.zhou 已提交
474 475 476 477

**Example**

  ```js
W
wusongqing 已提交
478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495
  systemTime.setTimezone('Asia/Shanghai', (error, data) => {       
      if (error) {          
          console.error('failed to systemTime.setTimezone because ' + JSON.stringify(error));         
          return;       
      }       
      console.info('SystemTimePlugin systemTime.setTimezone success data : ' + JSON.stringify(data)); 
  });
  ```


## systemTime.setTimezone

setTimezone(timezone: string): Promise&lt;void&gt;

Sets the system time zone. This API uses a promise to return the result.

**Required permissions**: ohos.permission.SET_TIME_ZONE

E
ester.zhou 已提交
496
**System capability**: SystemCapability.MiscServices.Time
W
wusongqing 已提交
497

E
ester.zhou 已提交
498
**Parameters**
W
wusongqing 已提交
499

E
ester.zhou 已提交
500 501 502
| Name  | Type  | Mandatory| Description      |
| -------- | ------ | ---- | ---------- |
| timezone | string | Yes  | System time zone to set.|
W
wusongqing 已提交
503

E
ester.zhou 已提交
504 505
**Return value**

E
ester.zhou 已提交
506 507
| Type               | Description                |
| ------------------- | -------------------- |
E
ester.zhou 已提交
508 509 510 511 512
| Promise&lt;void&gt; | Promise used to return the result.|

**Example**

  ```js
W
wusongqing 已提交
513 514 515 516 517 518 519 520 521 522 523 524 525 526
  systemTime.setTimezone('Asia/Shanghai').then((data) => {        
      console.log(`systemTime.setTimezone success data : ` + JSON.stringify(data));     
  }).catch((error) => {        
      console.error(`failed to systemTime.setTimezone because: ` + JSON.stringify(error));    
  });
  ```


## systemTime.getTimezone<sup>8+</sup>

getTimezone(callback: AsyncCallback&lt;string&gt;): void

Obtains the system time zone. This API uses an asynchronous callback to return the result.

E
ester.zhou 已提交
527
**System capability**: SystemCapability.MiscServices.Time
W
wusongqing 已提交
528

E
ester.zhou 已提交
529
**Parameters**
W
wusongqing 已提交
530

E
ester.zhou 已提交
531 532 533
| Name  | Type                       | Mandatory| Description                    |
| -------- | --------------------------- | ---- | ------------------------ |
| callback | AsyncCallback&lt;string&gt; | Yes  | Callback used to return the system time zone.|
E
ester.zhou 已提交
534 535 536 537

**Example**

  ```js
W
wusongqing 已提交
538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553
  systemTime.getTimezone((error, data) => {
      if (error) {
          console.error(`failed to systemTime.getTimezone because ` + JSON.stringify(error));
          return;
      }
      console.log(`systemTime.getTimezone success data : ` + JSON.stringify(data));
  });
  ```


## systemTime.getTimezone<sup>8+</sup>

getTimezone(): Promise&lt;string&gt;

Obtains the system time zone. This API uses a promise to return the result.

E
ester.zhou 已提交
554
**System capability**: SystemCapability.MiscServices.Time
W
wusongqing 已提交
555

E
ester.zhou 已提交
556
**Return value**
W
wusongqing 已提交
557

E
ester.zhou 已提交
558 559
| Type                 | Description                                 |
| --------------------- | ------------------------------------- |
E
ester.zhou 已提交
560 561 562 563 564
| Promise&lt;string&gt; | Promise used to return the system time zone.|

**Example**

  ```js
W
wusongqing 已提交
565 566 567 568 569 570
  systemTime.getTimezone().then((data) => {
      console.log(`systemTime.getTimezone success data : ` + JSON.stringify(data));
  }).catch((error) => {
      console.error(`failed to systemTime.getTimezone because ` + JSON.stringify(error));
  });
  ```