Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anyone know a workaround for this Chrome bug?

So I've got the following script:

<HTML><HEAD>
<SCRIPT>
  function alert_minutes() {
    var d=new Date();
    alert ('Minutes past the hour: '+d.getMinutes());
  }
</SCRIPT>
</HEAD><BODY>
  <button onclick="alert_minutes()">Click Me</DIV>
</BODY></HTML>

And I load it in Chrome. I press the button and it tells me

Minutes past the hour: 30

which is correct. I fast forward my local time by ten minutes, press it again and it tells me

Minutes past the hour: 40

so no problem there. Now I set my local time back to the correct time, press it a third time and it still says

Minutes past the hour: 40

I refresh the page, press it a fourth time, but it still says

Minutes past the hour: 40

I close all Chrome windows and re-open the browser and finally it knows the correct time.

So I conclude "without closing and re-opening the browser, Chrome can't handle the local time being set backwards, only forwards". This is not the case using the same script with Firefox. Anyone know a workaround for this bug? I'm using Chrome 16 on Win XP.

like image 550
flea whale Avatar asked Nov 12 '11 14:11

flea whale


People also ask

How do I bypass insecure Chrome?

Allow Invalid Certificates From localhost In Chrome, browse to: chrome://flags/ . Search for “insecure” and you should see the option to “Allow invalid certificates for resources loaded from localhost.” Enable that option and restart your browser.

Why is Chrome saying every website is unsafe?

The reason you are seeing the “Not Secure” warning is because the web page or website you are visiting is not providing an encrypted connection. When your Chrome browser connects to a website it can either use the HTTP (insecure) or HTTPS (secure).


1 Answers

that's normal if chrome it is using a monotonic clock (e.g. CLOCK_MONOTONIC) to get the time

like image 126
fferri Avatar answered Oct 01 '22 00:10

fferri