Take the 2-minute tour ×  I assume I should be able to do it
like so:  var date = Math.round((new Date).getTime() / 1000);
However, that is logging:   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  share|improve this question It works fine when I
try it, but I get a much less weird answer than you do. Current
value for me (from your first expression) is 1332453704. Maybe
your console.log() is messed up because that leading "30" is
causing your problem. –  Pointy Mar 22 '12 at 22:01 Are you sure
your system time is correct? I just ran your code on Chrome's
developer tools, and I get 1332453724 (the right time)... – 
darkajax Mar 22 '12 at 22:02 And for me it's 1332453705. Seems
fine. –  Supr Mar 22 '12 at 22:02 @Pointy see my answer for
strange anomaly. –  tsdexter Ma