Skip to content

Instantly share code, notes, and snippets.

@astraloverflow
Created December 15, 2018 01:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astraloverflow/5b63169e55d82bc7be16f2a12d322439 to your computer and use it in GitHub Desktop.
Save astraloverflow/5b63169e55d82bc7be16f2a12d322439 to your computer and use it in GitHub Desktop.
One-liner function to get current Unix time (seconds since 1970-01-01 0:00 UTC)
const getUnixTime = () => ~~(Date.now() / 1000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment