How can I use the Date() use correctly in javascript?
<p>I am having problem using Date Object, when I try to parse unix-timestamp.</p>

<p>example:</p>

<pre><code>//I am receiving json data that contains Unix-Timestamp like 1348514100000

var unixTimestamp = data.timestamp; //1348514100000
var date = new Date(unixTimestamp);
console.log(date.getDay()); // is wrong..
</code></pre>

<p>and example 2:</p>

<pre><code>var unixTimestamp = data.timestamp; //1348514100000
var date = new Date();
date = date.setDate(unixTimestamp);
console.log(date.getDay()); // still wrong..
</code></pre>

<p>I have tried to parse string-timestamp to convert int with</p>

<pre><code>var intUT = parseInt(unixTimestamp);
</code></pre>

<p>but still not the correct date&amp;time.. I have really no idea what to do. How can I get the correct date and time from this unix timestamp?</p>

<p>Thank you!</p>
