Bug#518486: iceweasel: Iceweasel handles dates in Javascript incorrectly

Mike Hommey mh at glandium.org
Sun Dec 20 08:00:18 UTC 2009


On Sat, Dec 19, 2009 at 11:55:57PM +0000, Alan Chandler wrote:
> Mike Hommey wrote:
> >Hi,
> >
> >Sorry for the late answer.
> >
> >On Fri, Mar 06, 2009 at 02:34:37PM +0000, Alan Chandler wrote:
> >>Package: iceweasel
> >>Version: 3.0.6-1
> >>Severity: important
> >>Tags: l10n
> >>
> >>If I create some javascript to output the hours of a Date object
> >>created with (0) as the parameter I get the answer 1 in Iceweasel, 0
> >>in Firefox (under windows) and 0 in Internet Explorer.
> >>
> >><html>
> >><body>
> >>
> >><script type="text/javascript">
> >>
> >>var d = new Date(0);
> >>
> >>document.write('hours = '+d.getHours());
> >>
> >></script>
> >>
> >></body>
> >></html>
> >>
> >>(This may be related to the fact that I also get the current time and
> >>date shown as BST rather than GMT from Javascripts toLocaleString -
> >>reported upstream as bug 425901 approx 11 months ago)
> >>
> >>(I am in the UK - as can be seen from my Locale below)
> >
> >I'm not shocked. d.getUTCHours() returns 0, that getHours() returns 1
> >when you are in GMT+1 is expected.
> >
> >Mike
> 
> BUT I AN NOT IN GMT+1 at that point.  I am at GMT. So it SHOULD
> return 0, as do all the other browsers I mention

What does d.getTimezoneOffset() return ?

Mike





More information about the pkg-mozilla-maintainers mailing list