How do I get the current date/time in seconds in Javascript?
You can met another way to get time in seconds/milliseconds since 1 Jan 1970:
var milliseconds = +new Date; var seconds = milliseconds / 1000;
But be careful with such approach, cause it might be tricky to read and understand it.