<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Safari 8 and 9 have a Date bug with the "milliseconds" param."
href="https://bugs.webkit.org/show_bug.cgi?id=150386">150386</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Safari 8 and 9 have a Date bug with the "milliseconds" param.
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Nightly Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>URL</th>
<td>https://github.com/es-shims/es5-shim/issues/329
</td>
</tr>
<tr>
<th>OS</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Critical
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>JavaScriptCore
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ljharb@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>darin@apple.com, fpizlo@apple.com, ggaren@apple.com, utatane.tea@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>See <a href="https://github.com/es-shims/es5-shim/issues/329">https://github.com/es-shims/es5-shim/issues/329</a>
`new Date(1970, 0, 1,0, 0, 0, 2147483647);` produces a valid Date object, `new Date(1970, 0, 1,0, 0, 0, 2147483648);` does not. 2147483648 is, of course, `Math.pow(2, 31)`.
So, the issue seems to be that Safari 8 and 9 - alone amongst the browsers, it's worth noting - is treating the millisecond parameter to `Date` as a signed 32-bit integer - when in fact, it should allow all integer values up to `Number.MAX_SAFE_INTEGER`: ie, a 64-bit signed integer, also known as a normal JS number value.
This does not appear to be an issue for the other parameters to the 7-arg form of the Date constructor, but when fixing this, please verify that all JS Number values work as expected when passed in as any of the 7 arguments.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>