getMonth getUTCMonth difference result
<p>I found and inconsistent result when using the JavaScript date.getMonth() and date.getUTCMonth(), but only with some dates. The following example demonstrates the problem:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body onload="myFunction()"&gt;

&lt;p id="demo"&gt;Click the button to display the month&lt;/p&gt;

&lt;script type="text/javascript"&gt;
function myFunction()
{
var d = new Date(2012, 8, 1);
var x = document.getElementById("demo");
x.innerHTML=d;
x.innerHTML+='&lt;br/&gt;result: ' + d.getMonth();
x.innerHTML+='&lt;br/&gt;result UTC: ' + d.getUTCMonth();

}
&lt;/script&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>The output of this example is:</p>

<pre><code>Sat Sep 01 2012 00:00:00 GMT+0100 (Hora de Verão de GMT)
result: 8
result UTC: 7
</code></pre>

<p>If i change the date to (2012, 2, 1) the output is:</p>

<pre><code>Thu Mar 01 2012 00:00:00 GMT+0000 (Hora padrão de GMT)
result: 2
result UTC: 2
</code></pre>

<p>In the first example, getMonth returns 7 and getUTCMonth returns 8. In the second example, both returns the same value 2.</p>

<p>Does anyone already experiences this situation? I am from Portugal and i think that it has something to be with my GMT but i don't understand why this is happening, because the examples are running in same circumstances.</p>

<p>Thanks in advances</p>
