Get Current Timestamp with Javascript

Returns current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)

function timestamp() { var today = new Date(); var time = Math.floor(today.getTime() / 1000); return time; }

Love this source code? Please help us to spread it ^_^
 

Discuss

No discussion for this source code yet. Be the first to discuss about this code.

Submit Comment

Sorry, you have to login for joining the discussion

Click here to register or login using your facebook account