Reviewers: Yang,
Message:
Those two mozilla test cases fail in a time zone without daylight saving
time,
for example, in Beijing.
The reason is that the JavaScript implementation of UTC and LocalTime in
ecma/shell.js assumes daylight saving time adjustment is 1 hour from
DSTStart to
DSTEnd. For a timezone without daylight saving time, the expected result
(computed from JavaScript implementation) will be an hour earlier or later
than
the actual result (computed from the V8 engine).
"
function UTC( t ) {
return ( t - LocalTZA() - DaylightSavingTA(t - LocalTZA()) );
}
function LocalTime( t ) {
return ( t + LocalTZA() + DaylightSavingTA(t) );
}
function DaylightSavingTA( t ) {
t = t - LocalTZA();
var dst_start = GetDSTStart(t);
var dst_end = GetDSTEnd(t);
if ( t >= dst_start && t < dst_end )
return msPerHour;
return 0;
}
function GetDSTStart( t )
{
return (GetFirstSundayInMonth(t, 2) + 7*msPerDay + 2*msPerHour -
LocalTZA());
}
function GetDSTEnd( t )
{
return (GetFirstSundayInMonth(t, 10) + 2*msPerHour - LocalTZA());
}
"
Description:
Update mozilla.status for a timezone without daylight saving time.
Please review this at https://codereview.chromium.org/198633002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+4, -3 lines):
M test/mozilla/mozilla.status
Index: test/mozilla/mozilla.status
diff --git a/test/mozilla/mozilla.status b/test/mozilla/mozilla.status
index
197e65137cd878b27edc96f69c61239e2c145198..52288465963b2e7d974be365e1e45a806df35b6e
100644
--- a/test/mozilla/mozilla.status
+++ b/test/mozilla/mozilla.status
@@ -129,9 +129,10 @@
'ecma/Date/15.9.2.2-5': [PASS, FAIL],
'ecma/Date/15.9.2.2-6': [PASS, FAIL],
- # 1026139: These date tests fail on arm and mips
- 'ecma/Date/15.9.5.29-1': [PASS, ['arch == arm or arch == mipsel', FAIL]],
- 'ecma/Date/15.9.5.28-1': [PASS, ['arch == arm or arch == mipsel', FAIL]],
+ # 1026139: These date tests fail on arm and mips.
+ # These date tests also fail in a time zone without daylight saving time.
+ 'ecma/Date/15.9.5.29-1': [PASS, FAIL],
+ 'ecma/Date/15.9.5.28-1': [PASS, FAIL],
# 1050186: Arm/MIPS vm is broken; probably unrelated to dates
'ecma/Array/15.4.4.5-3': [PASS, ['arch == arm or arch == mipsel', FAIL]],
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.