I assume I should be able to do it like so:
var date = Math.round((new Date).getTime() / 1000);
console.log(date);
However, that is logging:
301332453318
Which if I run through this convertor ( http://www.epochconverter.com/ ) it outputs the date as being:
GMT: Wed, 06 Nov 11518 03:13:03 GMT
Is it clearly not the year 11518 right now and my system time is correct so why is the Javascript time wrong - or am I doing it wrong?
Thanks, Thomas