Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Unified Diff: test/mjsunit/date.js

Issue 8423004: Adapt date test to be timezone independant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/date.js
diff --git a/test/mjsunit/date.js b/test/mjsunit/date.js
index f74a13c692cceb3c5970894dc14113de0106c5de..fa43cbb43157eb3b8450ee2021492da4302913f9 100644
--- a/test/mjsunit/date.js
+++ b/test/mjsunit/date.js
@@ -190,13 +190,8 @@ assertTrue(isNaN(d.getTime()));
// Test creation with obscure date values.
-var timezoneOffset = new Date().getTimezoneOffset();
-d = new Date(1970, 0, 1 + 100000001, -24, -timezoneOffset);
-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())
+assertEquals(8640000000000000, Date.UTC(1970, 0, 1 + 100000001, -24));
+assertEquals(-8640000000000000, Date.UTC(1970, 0, 1 - 100000001, 24));
// Parsing ES5 ISO-8601 dates.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698