Closed Bug 1310806 Opened 8 years ago Closed 8 years ago

getTimezoneOffset incorrect during DST

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
blocker

Tracking

()

RESOLVED INVALID

People

(Reporter: alajohnny0109, Unassigned)

References

()

Details

+++ This bug was initially created as a clone of Bug #173431 +++ User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705) Build Identifier: Mozilla/1.2a getTimezoneOffset is returning 300 in the Eastern Time Zone during daylight savings time. The ECMA specs state: 15.9.5.22 Date.prototype.getTimezoneOffset() Returns the difference between local time and UTC time in minutes. 1. Let t be this time value. 2. If t is NaN, return NaN. 3. Return (t - LocalTime(t)) / msPerMinute. By these specs, Mozilla is returning the wrong offset -- it should be returning 240.. or 4 hours offset during DST, and not 300 or 5 hours (which would be correct in non-DST). Opera and IE (hiss) both return 240. Reproducible: Always Steps to Reproduce: 1. offset = getTimezoneOffset(); 2. window.alert(offset); Actual Results: 300 Expected Results: 240
Please use https://landfill.bugzilla.org/ for testing bugzilla.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.