1.5.1 • Published 3 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
3 years ago
1.5.0
3 years ago
1.4.1
3 years ago
1.4.0
3 years ago
1.3.10
4 years ago
1.3.9
4 years ago
1.3.8
4 years ago
1.3.7
4 years ago
1.3.6
4 years ago
1.3.5
4 years ago
1.3.4
5 years ago
1.3.3
5 years ago
1.3.2
5 years ago
1.3.1
5 years ago
1.3.0
5 years ago
1.2.5
5 years ago
1.2.4
5 years ago
1.2.3
5 years ago
1.2.2
5 years ago
1.2.1
5 years ago
1.2.0
5 years ago
1.1.6
5 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago