Skip to content

Instantly share code, notes, and snippets.

@wiyoe
Last active January 18, 2018 06:38
Show Gist options
  • Select an option

  • Save wiyoe/5e0d0592d47ac29db0baf2cd888874c3 to your computer and use it in GitHub Desktop.

Select an option

Save wiyoe/5e0d0592d47ac29db0baf2cd888874c3 to your computer and use it in GitHub Desktop.
Javascript Timestamp(seconds)
var d = new Date();
var seconds = Math.round(d.getTime() / 1000); // 10 digit
// Same as moment.js
moment().unix();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment