Possible Duplicate:
Convert a Unix timestamp to time in Javascript
I'm trying to convert the string that this api returns for date. The format is 1351993013
. I tried the following line of JS but the date is completely wrong.
var jsonDate = plugin.versions[0].date;
var pluginDate = new Date(jsonDate);
Which returns:
Fri Jan 16 1970
This is the first time I've tried to format a JSON date so it's a bit confusing. Can anyone help?