When I output the following code to console:
console.log(new Date().getTime());
It says this:
1382888243791
When I convert that code using an online converter like this http://www.onlineconversion.com/unix_time.htm I get this:
Sun, 25 Dec 45791 23:16:31 GMT
Obviously... there is a problem here. The biggest problem being the year of 45791!
How can I properly generate a date in javascript?