title: Problem with time displayed by javascript
body: <p>On some computers the time is displayed with a 1 plus (as if daylight saving time is active), and on other PCs the time is normal.</p>
  
  <p>On computers that show the wrong time on the site, on the PC itself the time is right, but on the site it shows 1 hour more.</p>
  
  <p>How can I fix this problem?</p>
  
  <p>In Brazil daylight saving time was extinguished from this year.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;input name="ANOATUAL" type="hidden" id="ANOATUAL" value="&lt;?php echo date("Y"); ?&gt;"&gt;
  &lt;input name="TIMEATUAL" type="hidden" id="TIMEATUAL" value="&lt;?php echo strtotime(date("Y-m-d H:i:s")); ?&gt;"&gt;
  &lt;td id="relogio"&gt;&lt;/td&gt;
  </code></pre>
  
  <p>JavaScript:</p>
  
  <pre><code>function iniciaCronometro(){
  
      var timeAgora = parseFloat(document.getElementById("TIMEATUAL").value);
      var anoAgora = document.getElementById("ANOATUAL").value;
  
      var myDate = new Date(timeAgora * 1000);
      var dataAtual = myDate.toLocaleString();
  
      var t = dataAtual.split(anoAgora);
      var horaAtual = trim(t[1]);
  
      var tempo = horaAtual.split(":");
  
      var h = tempo[0];
      var i = tempo[1];
      var s = tempo[2];
  
      document.getElementById("relogio").innerHTML = h+':'+i;
      document.getElementById("TIMEATUAL").value = (timeAgora + 1);
  
      setTimeout("iniciaCronometro()",1000);
  
  }
  </code></pre>
  
  <p>Trim function:</p>
  
  <pre><code>function trim(str){
      return str.replace(/^\s+|\s+$/g,"");
  }
  </code></pre>