Closed
Bug 379781
Opened 19 years ago
Closed 13 years ago
JavaScript Tests - adapt DST start|end using JS and OS
Categories
(Core :: JavaScript Engine, enhancement)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: bc, Assigned: bc)
Details
On Linux we get the actual DST for years prior to 2007 however on Windows we do not.
We "could" fudge this and instead of using the 2007 DST algorithm in the test suite for all years on all platforms, we could do a quick experiment to determine which DST algorithm is in use. E.g.
FC6
new Date('2006/03/12 03:00:00')
Sun Mar 12 2006 03:00:00 GMT-0500 (EST)
new Date('2007/03/11 03:00:00')
Sun Mar 11 2007 03:00:00 GMT-0400 (EDT)
WinXPSp2
new Date('2006/03/12 03:00:00')
Sun Mar 12 2006 03:00:00 GMT-0400 (Eastern Daylight Time)
new Date('2007/03/11 03:00:00')
Sun Mar 11 2007 03:00:00 GMT-0400 (Eastern Daylight Time)
Using date.getTimezoneOffset() would probably be sufficient.
I think this would be in keeping with the spirit of the last para in ecma 262-3 15.9.1.9 Daylight Saving Time Adjustment says:
If the host environment provides functionality for determining daylight saving time, the implementation of ECMAScript is free to map the year in question to an equivalent year (same leap-year- ness and same starting week day for the year) for which the host environment provides daylight saving time information. The only restriction is that all equivalent years should produce the same result.
Objections?
Flags: in-testsuite-
| Assignee | ||
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•