To get the timestamp in Java Script, you can try to run the following code. It returns the timestamp since 1970/01/01
Example
Live Demo
<!DOCTYPE html> <html> <body> <script> var timeStamp = Math.floor(Date.now() / 1000); document.write("TimeStamp= "+timeStamp); </script> </body> </html>