I want to get the exact date and time when user opens a page in his browser. I am trying to achieve this by using 'new Date()'.
console.log(new Date());
Now, the issue is that it is picking user's machine time by default. For example, if I change my machine time manually, the output will be changed accordingly.
There are several ways to achieve this, 2 are listed below:
https://www.npmjs.com/package/ntp-time
Right way to get Web Server time and display it on Web Pages