Closed Bug 378683 Opened 13 years ago Closed 13 years ago

JavaScript Tests - update Daylight Savings Time tests to match US 2007 rules


(Core :: JavaScript Engine, defect)

Not set





(Reporter: bc, Assigned: bc)


(Blocks 1 open bug)



(3 files)

Attached patch diff -U 5 patchSplinter Review
In 2007, the rules for Daylight Saving Time changed in the United States.

Before 2007, DST starts on the first Sunday in April at 2 AM and ends last
Sunday in October at 2 AM

Starting in 2007, DST starts on the second Sunday in March at 2 AM and ends
first Sunday in November at 2 AM

Note that different operating systems behave differently.

Fully patched Windows XP uses the 2007 algorithm for all dates while
fully patched Fedora Core 6 and RHEL 4 Linux use the algorithm in
effect at the time via the localtime time zone data.

Since pre-2007 DST is a subset of 2007 DST rules, this only affects
tests that occur in the period Mar-Apr and Oct-Nov where the two
algorithms do not agree.

During the work on fixing this for SpiderMonkey's tests, I found a number of other issues scattered around in the date tests which I have attempted to correct as part of this patch. This included time zone issues, incorrect values for Feb 29, 2000, incorrect sets of "day" related tests, etc. I also removed dead code which had been commented out in the past. There is potentially more work to be done on consolidating some of the tests which appear to duplicate themselves.

I don't know who would like to review this patch if anyone. It is an overall improvement for Windows which now passes all ecma/Date tests for EDT/PDT, EST/PST and a slight degrade for Linux where ecma/Date/, ecma/Date/ now fail on Linux instead of Windows due to the ambiguous date range where the ecma DST rule conflicts with the Linux DST rule.
Flags: in-testsuite-
modulo whitespace changes.

If no one objects, I am going to check this in tomorrow.
Assignee: general → bclary
Attached file commit log
Closed: 13 years ago
Resolution: --- → FIXED
FYI, you might want to post to the newsgroup on this. They would probably be interested in confirming that this stuff works.
(In reply to comment #3)
> FYI, you might want to post to the newsgroup on this.
> They would probably be interested in confirming that this stuff works.

How|why would calendar folks confirm changes to the JavaScript Test Library work? This was not about a change to the functionality of the JavaScript Engine. This was a change to the test library only.
You need to log in before you can comment on or make changes to this bug.