Generate an epoch.
Javascript's Date Object always works in milliseconds, but most date/time code works on unix epochs. This is just a quickie one-off function designed to give you an epoch to work with.
function timestamp() {
return Math.round(Date.now() / 1000);
}
comments powered by Disqus