Adapt date test to be timezone independant.

R=yangguo@chromium.org
BUG=v8:1792
TEST=mjsunit/date

Review URL: http://codereview.chromium.org/8423004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a2240fc5
...@@ -190,13 +190,8 @@ assertTrue(isNaN(d.getTime())); ...@@ -190,13 +190,8 @@ assertTrue(isNaN(d.getTime()));
// Test creation with obscure date values. // Test creation with obscure date values.
var timezoneOffset = new Date().getTimezoneOffset(); assertEquals(8640000000000000, Date.UTC(1970, 0, 1 + 100000001, -24));
d = new Date(1970, 0, 1 + 100000001, -24, -timezoneOffset); assertEquals(-8640000000000000, Date.UTC(1970, 0, 1 - 100000001, 24));
assertFalse(isNaN(d.getTime()));
assertEquals(8640000000000000, d.getTime())
d = new Date(1970, 0, 1 - 100000001, 24, -timezoneOffset);
assertFalse(isNaN(d.getTime()));
assertEquals(-8640000000000000, d.getTime())
// Parsing ES5 ISO-8601 dates. // Parsing ES5 ISO-8601 dates.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment