If i run the following code in google Chrome (Version 40.0.2214.111 m) the system clock accelerates and the system clock goes approx 1-2 second faster every 10 seconds.
I have tested this on a machine running windows 7 64-bit, with intel Atom D525 1.8GHz, 2GB of RAM. All Windows Updates and drivers installed.
setInterval(function(){
var clientTime = new Date().getTime();
console.log(clientTime)
},100);
When running the same code in IE, i have no issues with the system time changing.
Anyone else experience the same issue?
Update
I added a little test, by using jquery and php to get the time from the webserver (has to be another machine). You can see that the client time changes relative to the webservers time.
following serverTime.php on the webbserver.
<?php
date_default_timezone_set('Europe/Stockholm');
$date = microtime(true);
print $date;
?>
The above (first) JS, changed to:
setInterval(function(){
$.ajax({
url: 'serverTime.php',
type: 'POST',
success: function( serverTime ){
var clientTime = new Date().getTime() / 1000;
var diff = serverTime - clientTime;
console.log(serverTime,clientTime,diff)
}
});
},100);
! the webserver cannot be the same as the client-computer, then the differance will not be showing.
you will always get an differance between servertime and client time because of the execution time of the server code, but the differance would be somewhat constant.
Update 2015-02-17
Now i have tested by installing node and running the same code:
setInterval(function(){
var clientTime = new Date().getTime();
console.log(clientTime)
},100);
I get no change UNTIL i open google Chrome, then of a sudden the system time starts to change, not at the same speed as above but a couple seconds per minute. (just starting chrome, nothing else)
This is Insane,