Last active
December 18, 2015 15:49
-
-
Save niksumeiko/5806576 to your computer and use it in GitHub Desktop.
JavaScript function that returns current UNIX timestamp (eg 1371570826).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Returns UNIX timestamp. | |
// Sometimes visible in different JavaScript developers teams as now(). | |
function getUNIXTimestamp() { | |
return Math.round((new Date()).getTime() / 1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment