Closed Bug 610183 Opened 14 years ago Closed 7 years ago

jsreftest failure looking suspiciously like a Daylight Time failure: jsreftest.html?test=ecma_3/Date/15.9.5.7.js | d = new Date(1289117024406); d == new Date(d.toDateString() + " " + d.toLocaleTimeString()) wrong value item 12

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: robert.strong.bugs, Assigned: till)

References

Details

(Keywords: intermittent-failure, Whiteboard: [orange:time-bomb])

Attachments

(1 file)

Rev3 Fedora 12 mozilla-central opt test jsreftest on 2010/11/07 01:00:45

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1289116845.1289117190.27034.gz

REFTEST TEST-PASS | file:///home/cltbld/talos-slave/mozilla-central_fedora_test-jsreftest/build/jsreftest/tests/jsreftest.html?test=ecma_3/Date/15.9.5.7.js | d = new Date(951811200000); d == new Date(d.toDateString() + " " + d.toLocaleTimeString())  item 11
REFTEST TEST-UNEXPECTED-FAIL | file:///home/cltbld/talos-slave/mozilla-central_fedora_test-jsreftest/build/jsreftest/tests/jsreftest.html?test=ecma_3/Date/15.9.5.7.js | d = new Date(1289117024406); d == new Date(d.toDateString() + " " + d.toLocaleTimeString()) wrong value  item 12
Whiteboard: [orange][orange:time-bomb]
Whiteboard: [orange][orange:time-bomb] → [orange:time-bomb]
Blocks: 934238
Assignee: general → nobody
Jandem, could your patch in bug 1089745 be causing this now that Europe has changed clocks?
Flags: needinfo?(jdemooij)
(In reply to Till Schneidereit [:till] from comment #126)
> Jandem, could your patch in bug 1089745 be causing this now that Europe has
> changed clocks?

Nothing to see here -- this happens every year, right around when when California (and presumably our test machines) go from PDT to PST.
After some IRC discussion with dholbert, I came up with this gnarly workaround. Essentially, just don't try to run any of the ES3 Date tests during the hours around DST switchover. We don't lose any coverage because the tests don't check for DST switchover behavior.

I think that really, there isn't much of a good reason for these tests to use the current date at all - they could just use a hard-coded timestamp for everything. Changing to that would require a more in-depth verification to make sure we really wouldn't lose any coverage, though, so I'm not inclined to do that.

Jandem, requesting review from you because you recently fixed the some-tests-fail-outside-the-bay-area thing (\o/), and no good deed should go unpunished.
Attachment #8515661 - Flags: review?(jdemooij)
Assignee: nobody → till
Status: NEW → ASSIGNED
Comment on attachment 8515661 [details] [diff] [review]
Workaround for Date tests failing around DST switchover

So the failing test in 15.9.5.7 compares the strings

"Sun Nov 02 2014 01:47:42 GMT-0700 (PST)"
(result of now.toString())

and
"Sun Nov 02 2014 01:47:42 GMT-0800 (PST)"
(result of new Date(now.toDateString() + " " + now.toLocaleTimeString()).toString())

As Philor rightly points out, only one of these can be correct. Specifically, PST is GMT-0800, so the first string is wrong. Looks like we have a real bug in stringifying the date during DST switchover. :(
Flags: needinfo?(jdemooij)
Attachment #8515661 - Flags: review?(jdemooij)
Fixed in https://hg.mozilla.org/mozilla-central/rev/b7ef07909cc4


Before (Win10):
new Date(2014, 11-1, 2, 1, 47, 42).toString()
"Sun Nov 02 2014 01:47:42 GMT-0700 (Pacific Standard Time)"

After (Win10):
new Date(2014, 11-1, 2, 1, 47, 42).toString()
"Sun Nov 02 2014 01:47:42 GMT-0700 (Pacific Daylight Time)"


Before (Ubuntu):
new Date(2014, 11-1, 2, 1, 47, 42).toString()
"Sun Nov 02 2014 01:47:42 GMT-0700 (PST)"

After (Ubuntu):
new Date(2014, 11-1, 2, 1, 47, 42).toString()
"Sun Nov 02 2014 01:47:42 GMT-0700 (PDT)"
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Depends on: 1414586
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: