3
Well, I’m having trouble getting the date and time in Javascript when the computer, or the system has this incorrect data.
- Official time: 08:35 - 07/14/2016 - Brazilian Time
- Computer time: 23:46 - 12/07/2016
No matter what method I try in Javascript, the time always comes based on the Hora do computador
, even if you try getUTCDate()
, getTimezoneOffset()
, etc....
Is there any way to fix this problem only with Javascript? Or do I really need to base myself on a schedule obtained directly from my server?
Note: It is important that the time is correct because it controls the operation of e-commerce site.
Have you ever used
date.toISOString();
?– Sergio
@Sergio yes, based on
Hora do computador
of the question, that is the result obtained:2016-07-13T02:51:41.447Z
It does everything based on system date/time– celsomtrindade