V
V
vetsmen2017-02-04 01:34:51
JavaScript
vetsmen, 2017-02-04 01:34:51

Why is the value of new Date different on server and client?

Good day, I noticed this picture:
a04996f616.jpg
The left window is the browser, the right window is the node.js server, everywhere I request the value of new Date().getTime();
Why is this happening and how to deal with it? I need to send the start time of the animation to the client, and with this problem I cannot compare the time values ​​at all.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Burov, 2017-02-04
@vetsmen

It's just that somewhere (on the client, or on the server, or both) the clock is wrong.
https://habrahabr.ru/post/146109/ items 11-16.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question