Date.getTimezoneOffset() returns wrong offset after time zone is changed

RESOLVED DUPLICATE of bug 285615

Status

()

RESOLVED DUPLICATE of bug 285615
14 years ago
14 years ago

People

(Reporter: xiaodiwu, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3

After the browser launches (or at least after a javascript Date object is first
initialized), the time zone is no longer updated to match the user's system in
subsequent Date objects. As a result, Date.getTimezoneOffset() (as well as all
other Date functions that return the time zone) return the wrong time zone if
the user changes the time zone on the operating system after browser launch.

Reproducible: Always

Steps to Reproduce:
1. Launch Firefox
2. Load a page with some simple javascript that includes:
now = new Date();
(This step may not be necessary)
3. Change time zone on operating system (i.e. from GMT-2 to GMT+10)
4. Without quitting Firefox, open a new window (or just the javascript console)
and execute the javascript:
now2 = new Date();
5. Observe the time zone given in variable now2.

Actual Results:  
The time zone given is the old one (in the example above, GMT-2) instead of the
actual one (GMT+10).

Expected Results:  
The time zone returned should be the current time zone on the user's system.
IE6/Windows has a correct implementation. Marking severity as 'normal' because
there is no apparent workaround.

Updated

14 years ago
Assignee: nobody → general
Component: General → JavaScript Engine
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → Trunk

*** This bug has been marked as a duplicate of 285615 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.