Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I checked the <a href="http://docs.sencha.com/ext-js/3-4/source/Date.html#Date-static-method-parseDate" rel="nofollow">parseDate() implementation in ExtJS source code</a> and the <a href="http://devedge-temp.mozilla.org/library/manuals/2000/javascript/1.5/reference/date.html#1193137" rel="nofollow">documentation of Date in core JavaScript</a>, the Date() constructor used by ExtJS does not support time zone information. JavaScript Date objects represent a UTC value, without the time zone. During parsing in ExtJS source code, the time zone is lost while the corresponding offset in minutes/seconds is added to the Date.</p> <p>I then checked the <a href="http://docs.sencha.com/ext-js/3-4/source/Date.html#Date-method-getGMTOffset" rel="nofollow">source code of getGMTOffset() defined by ExtJS</a>: it builds a time-zone string using the getTimezoneOffset() function defined in JavaScript.</p> <p>Quoting the <a href="http://devedge-temp.mozilla.org/library/manuals/2000/javascript/1.5/reference/date.html#1193844" rel="nofollow">documentation of getTimezoneOffset()</a>:</p> <blockquote> <p>The time-zone offset is the difference between local time and Greenwich Mean Time (GMT). Daylight savings time prevents this value from being a constant.</p> </blockquote> <p>The time-zone is not a variable stored in the Date, it is a value that varies according to the period of the year that the Date falls in.</p> <p>On my computer, with a French locale,</p> <pre><code>new Date(2010,1,20).getTimezoneOffset() // -60 new Date(2010,9,20).getTimezoneOffset() // -120 </code></pre> <p>Edit: this behavior is not specific to Date parsing in ExtJS, the following note in the <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/parse" rel="nofollow">documentation of Date.parse() on Mozilla Doc Center</a> is relevant here as well:</p> <blockquote> <p>Note that while time zone specifiers are used during date string parsing to properly interpret the argument, they do not affect the value returned, which is always the number of milliseconds between January 1, 1970 00:00:00 UTC and the point in time represented by the argument.</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload