Communities for your favorite technologies. Explore all Collectives
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I was looking for a method of getting timestamp in jquery, like we do it in php by time() (which is seconds since Jan 1 1970).
time()
I tried event.timeStamp, but it output 9 digits starting with 9, which I know is incorrect.
event.timeStamp
Use jquery.now() http://jsbin.com/icesab/edit#javascript,html
Add a comment
Try this:
Math.floor(+new Date() / 1000)
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.