Detecting changes to system time in JavaScript

前端 未结 7 1459
猫巷女王i
猫巷女王i 2021-01-04 04:04

How can I write a script to detect when a user changes their system time in JS?

7条回答
  •  無奈伤痛
    2021-01-04 04:49

    Do you mean if they are changing their own system time to something that is wrong? You can ask the user for their time zone and get the correct time from the server, and then compare it to the user's system time.

提交回复
热议问题