1.5.1 • Published 4 years ago
global-time v1.5.1
global-time@1.5.1
Gets UTC real time in milliseconds with 0.001 precision from http://worldtimeapi.org/api/timezone/Etc/UTC. \ From v1.3.0 no longer supports https://time.gov/actualtime.cgi due missing time value.
It's completely not dependent on machine local time.
Installation
global-time
is available via NPM:
$ npm i global-time@1.5.1
Usage
import globalTime from 'global-time';
(async () => {
const time = await globalTime();
const date = new Date(time);
console.log(time); // 1616323147279.481
console.log(date); // 2021-03-21T10:39:07.279Z
})();
Testing
$ npm test
Your improve suggestions and bug reports are welcome any time.
1.5.1
4 years ago
1.5.0
4 years ago
1.4.1
4 years ago
1.4.0
4 years ago
1.3.10
5 years ago
1.3.9
5 years ago
1.3.8
5 years ago
1.3.7
5 years ago
1.3.6
5 years ago
1.3.5
5 years ago
1.3.4
6 years ago
1.3.3
6 years ago
1.3.2
6 years ago
1.3.1
6 years ago
1.3.0
6 years ago
1.2.5
6 years ago
1.2.4
6 years ago
1.2.3
6 years ago
1.2.2
6 years ago
1.2.1
6 years ago
1.2.0
6 years ago
1.1.6
6 years ago
1.1.5
6 years ago
1.1.4
6 years ago
1.1.3
6 years ago
1.1.2
6 years ago
1.1.1
6 years ago
1.1.0
6 years ago