title: jQuery progress bar with timezone/start date/end date
body: <p>I am using this:</p>
  
  <pre><code>var start = new Date();
  var maxTime = 835000;
  var timeoutVal = Math.floor(maxTime/100);
  animateUpdate();
  
  function updateProgress(percentage) {
      $('#pbar_innerdiv').css("width", percentage + "%");
      $('#pbar_innertext').text(percentage + "%");
  }
  
  function animateUpdate() {
      var now = new Date();
      var timeDiff = now.getTime() - start.getTime();
      var perc = Math.round((timeDiff/maxTime)*100);
        if (perc &lt;= 100) {
         updateProgress(perc);
         setTimeout(animateUpdate, timeoutVal);
        }
  }
  </code></pre>
  
  <p><a href="https://jsfiddle.net/6h74c/3/" rel="nofollow">https://jsfiddle.net/6h74c/3/</a></p>
  
  <p>And it works. But it only works when you load the page and starts calculating the <code>maxTime</code> (which is in miliseconds). Which is useless. I need to set starting date and ending date e.g. 3 days and 5 hours (including timezone and when entering date, need to include also hours). So if user visits in 2 days, he would already see the progress bar ~70% complete, and so on.</p>
  
  <p>This is a progress bar for a site under construction. So we could let visitors know how long till the site is complete.</p>