S
S
SpideR-KOSS2018-07-30 08:47:55
JavaScript
SpideR-KOSS, 2018-07-30 08:47:55

Function to get server time?

Good afternoon!
I give static html through Express.
exp.use(express.static('site'));
The html code has a function to get the time. In this case, what time will be stored in the Date() object - client time or server time?
var Date_default = new Date();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2018-07-30
@SpideR-KOSS

If this function is executed on the server, then the server, if on the client, then the client. It's obvious. Since you have static html, this script is executed on the client.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question