title: Issues with Javascript countdown
body: <p>Well I'm trying to recreate the countdown for each of these challenges seen here:
  <a href="http://www.bungie.net/stats/reach/globalchallenges.aspx" rel="nofollow">http://www.bungie.net/stats/reach/globalchallenges.aspx</a></p>
  
  <p>The problem is if you compare <a href="http://www.halogamertags.com/test/cd.php" rel="nofollow">my countdown</a> with the <a href="http://www.bungie.net/stats/reach/globalchallenges.aspx" rel="nofollow">original countdown</a> there is about a 10-14 second difference, I just don't understand why? Thanks!</p>
  
  <p>I'm using the source from their <a href="http://www.bungie.net/mobile/GlobalChallenges.aspx" rel="nofollow">mobile page</a>(view source) to get the expiration times.</p>
  
  <pre><code>&lt;span id="wExpSeconds" title="1304330400000"&gt;&lt;/span&gt;
  &lt;span id="dExpMilliseconds" title="1303984800000"&gt;&lt;/span&gt;
  </code></pre>
  
  <p>Here is the source code of my countdown page:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;&lt;/title&gt;
          &lt;style type="text/css"&gt;
          .stat{ font: 14px/18px Arial, Helvetica, sans-serif; color:#bbb; }
          .seconds{ color:#ff5f3c; }
          &lt;/style&gt;
      &lt;/head&gt;
      &lt;body&gt;
  
          &lt;div id="countDownDiv"&gt;&lt;/div&gt;
  
          &lt;script type="text/javascript"&gt;
          function countDown(id, end, cur){
              this.container = document.getElementById(id);
              this.endDate = new Date(end);
              this.curDate = new Date(cur);
  
  
              var context = this;
  
              var formatResults = function(day, hour, minute, second){
              var displayString = [
                  '&lt;span class="stat"&gt;',day,'d &lt;/span&gt;',
                  '&lt;span class="stat"&gt;',hour,'h &lt;/span&gt;',
                  '&lt;span class="stat"&gt;',minute,'m &lt;/span&gt;',
                  '&lt;span class="stat seconds"&gt;',second,'s&lt;/span&gt;'
              ];
              return displayString.join("");
              }
  
              var update = function(){
                  context.curDate.setSeconds(context.curDate.getSeconds()+1);
  
                  var timediff = (context.endDate-context.curDate)/1000; 
  
                  // Check if timer expired:
                  if (timediff&lt;0){ 
                      return context.container.innerHTML = formatResults(0,0,0,0);
                  }
  
                  var oneMinute=60; //minute unit in seconds
                  var oneHour=60*60; //hour unit in seconds
                  var oneDay=60*60*24; //day unit in seconds
  
                  var dayfield=Math.floor(timediff/oneDay);
                  var hourfield=Math.floor((timediff-dayfield*oneDay)/oneHour);
                  var minutefield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour)/oneMinute);
                  var secondfield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour-minutefield*oneMinute));
  
                  context.container.innerHTML = formatResults(dayfield, hourfield, minutefield, secondfield);
  
                  // Call recursively
                  setTimeout(update, 1000);
              };
  
              // Call the recursive loop
              update();
              }
  
          countDown("countDownDiv",1304330400000, new Date().getTime());
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>