Date.toLocaleTimeString does not show the proper time. It is 4 hours difference from the current time. Why?

Viewed 2561

Code:

    var date = new Date().toLocaleTimeString({timezone: 'UTC'});

The result is 4 hours difference from the real current time. Could someone help?

2 Answers

In the App settings, Have you set your Time zone? Perhaps this is the issue. In the client side, it will use the client time, on the server side, it will use Server time. Hope this helps!

Related