1 | [![All dependencies](https://img.shields.io/librariesio/release/npm/global-time/1.3.10?style=flat-square "All dependencies of global-time@1.3.10")](https://libraries.io/npm/global-time/1.3.10)
|
2 | [![Reported vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/global-time@1.3.10?style=flat-square "Reported vulnerabilities of global-time@1.3.10")](https://snyk.io/test/npm/global-time/1.3.10)
|
3 | [![NPM-version](https://img.shields.io/badge/npm-v1.3.10-blue.svg?style=flat-square&&logo=npm "Current NPM-version")](https://www.npmjs.com/package/global-time/v/1.3.10)
|
4 | [![Install size](https://flat.badgen.net/packagephobia/install/global-time@1.3.10?label=size 'Install size of global-time@1.3.10')](https://packagephobia.now.sh/result?p=global-time@1.3.10)
|
5 | [![Total downloads](https://img.shields.io/npm/dt/global-time?style=flat-square "Total downloads for all the time")](https://npm-stat.com/charts.html?package=global-time)
|
6 |
|
7 | # global-time@1.3.10
|
8 |
|
9 | Gets UTC real time in milliseconds with 0.001 precision from http://worldtimeapi.org/api/timezone/Etc/UTC. \
|
10 | From v1.3.0 no longer supports https://time.gov/actualtime.cgi due missing time value.
|
11 |
|
12 | **It's completely not dependent on machine local time.**
|
13 |
|
14 | ## Installation
|
15 | `global-time` is available via npm:
|
16 | ``` bash
|
17 | $ npm i global-time@1.3.10
|
18 | ```
|
19 |
|
20 | ## Usage
|
21 | ``` js
|
22 | const globalTime = require('global-time');
|
23 |
|
24 | (async () => {
|
25 | const time = await globalTime();
|
26 | const date = new Date(time);
|
27 |
|
28 | console.log(time); // 1560529986678.603
|
29 | console.log(date); // 2019-06-14T16:33:06.678Z
|
30 | })();
|
31 | ```
|
32 |
|
33 | ## Testing
|
34 | ``` bash
|
35 | $ npm test
|
36 | ```
|
37 |
|
38 | ---
|
39 |
|
40 | Your improve suggestions and bug reports are welcome any time.
|