toISOString () zwraca nieprawidłową datę
Dlaczego ten fragment kodu powrócił jutro?
Musi wrócić 2013-08-31, a nie 2013-09-01, ponieważ 31 sierpnia.
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_toisostring
function myFunction() {
var d = new Date();
var x = document.getElementById("demo");
x.innerHTML = d.toISOString();
}
<p id="demo">Click the button to display the date and time as a string, using the ISO
standard.</p>
<button onclick="myFunction()">Try it</button>