How can I write a script to detect when a user changes their system time in JS?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no (portable) way to track a variable in JavaScript. Also, date information does not lie in the DOM, so you don’t get the possibility of a DOM event being triggered.
The best you can do is to use
setIntervalto check periodically (every second?). Example: