Issue with .toISOString() function
<p>Consider the following code HTML + JavaScript:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;

&lt;p id="demo"&gt;Click the button to display a date after changing the hours, minutes, and seconds.&lt;/p&gt;

&lt;button onclick="myFunction()"&gt;Try it&lt;/button&gt;
 &lt;script&gt;
 function myFunction()
  {
  var d = new Date();
  d.setHours(0,0,0,0);
  document.write(d + '&lt;br/&gt;');
  document.write('ISO Date '+ d.toISOString() + '&lt;br/&gt;');
  //I want it to be 2013-04-17T00:00:00.000Z
  }
 &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p><strong>Output</strong>:</p>

<pre><code>Thu Apr 18 2013 00:00:00 GMT+0530 (India Standard Time)
ISO Date 2013-04-17T18:30:00.000Z
</code></pre>

<p>Could anyone help on understanding this difference in Date &amp; Time</p>
