Issue with Unix time converting to date
<p>I have the following code in Javascript:</p>

<pre><code>//obj.uploadDate = 1466679630387
temp = new Date(obj.uploadDate);
uploadDate =  temp.toString('yyyy-MM-dd HH:mm:ss');
</code></pre>

<p>For some reason, the value of <code>uploadDate</code> is <code>NaN-NaN-NaN NaN:NaN:NaN</code>, instead of a formatted date. </p>

<p>What could be the issue?</p>