Reviewers: titzer, mnita,

Message:
Btw. how do I run try bot for "V8 Win32" to check the actual behavior?

I've tried "git cl try --bot v8-win23", but no luck.

Description:
Fixing build (test) breakage by side stepping the Windows vs. Linux issue of
different Date object for the same millisecond timestamp by using UTC methods.

Windows:
new Date(129193200000);
Sun Feb 03 1974 23:00:00 GMT-0800 (Pacific Standard Time)

Linux:
new Date(129193200000);
Mon Feb 04 1974 00:00:00 GMT-0700 (PST)

BUG=2919

Please review this at https://codereview.chromium.org/26142004/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+6, -6 lines):
  M test/intl/date-format/parse-MMMdy.js
  M test/intl/date-format/parse-mdy.js


Index: test/intl/date-format/parse-MMMdy.js
diff --git a/test/intl/date-format/parse-MMMdy.js b/test/intl/date-format/parse-MMMdy.js index 73ee5867335b0f6a21e3c53c8a59a49cb1f84ce2..b23a3cde3a1edb2a408b58a4a8ce2a2046786ad6 100644
--- a/test/intl/date-format/parse-MMMdy.js
+++ b/test/intl/date-format/parse-MMMdy.js
@@ -37,9 +37,9 @@ var dtf = new Intl.DateTimeFormat(['en'],
 assertEquals('MMM d, y', dtf.resolved.pattern);

 var date = dtf.v8Parse('Feb 4, 1974');
-assertEquals(1974, date.getFullYear());
-assertEquals(1, date.getMonth());
-assertEquals(4, date.getDate());
+assertEquals(1974, date.getUTCFullYear());
+assertEquals(1, date.getUTCMonth());
+assertEquals(4, date.getUTCDate());

 // Missing , in the pattern.
 assertEquals(undefined, dtf.v8Parse('Feb 4 1974'));
Index: test/intl/date-format/parse-mdy.js
diff --git a/test/intl/date-format/parse-mdy.js b/test/intl/date-format/parse-mdy.js index 788a7bbd08cd196797fb387e08c4b82325cced58..7b1a79af8604b5d50bc0edc327269011365f3aed 100644
--- a/test/intl/date-format/parse-mdy.js
+++ b/test/intl/date-format/parse-mdy.js
@@ -28,9 +28,9 @@
 // Testing v8Parse method for date only.

 function checkDate(date) {
-  assertEquals(1974, date.getFullYear());
-  assertEquals(1, date.getMonth());
-  assertEquals(4, date.getDate());
+  assertEquals(1974, date.getUTCFullYear());
+  assertEquals(1, date.getUTCMonth());
+  assertEquals(4, date.getUTCDate());
 }

var dtf = new Intl.DateTimeFormat(['en'], {timeZone: 'America/Los_Angeles'});


--
--
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/groups/opt_out.

Reply via email to