title: How to get a countdown timer that starts on a specific date/time and counts down every hour
body: <p>I'm trying to achieve a countdown timer that would use a specific date and time for it to start. From there I need it to countdown from 1 hour and then update the initial date and time by adding an hour and then repeat itself indefinitely.</p>
  
  <p>This is used for a product auction that would get a new product once one sells out and the price drops every hour from when it is added to the auction which could be any time of day.</p>
  
  <p><strong>Example:</strong></p>
  
  <blockquote>
    <p>I need this timer to start on 2014, 7, 25, 11, 30, 0, 0 (August 25th,
    2014 at 11:30 AM EST) It would countdown 1 hour and upon completion it
    would add on an hour to the start date making 2014, 7, 25, 12, 30, 0,
    0 This would repeat itself indefinitely until I choose to stop it.</p>
  </blockquote>
  
  <p>It would also not change based on if the site visitor refreshed the page, meaning they visit the page and see 33 minutes left, not keep resetting it to 1 hour for each refresh.</p>
  
  <p>I was going to use this countdown timer: <a href="http://keith-wood.name/countdown.html" rel="nofollow">http://keith-wood.name/countdown.html</a></p>
  
  <p>What I needed was the time that I give it in variable form. I tried to research this as much as possible without any luck, most are not specific enough or only deal with the date and not the time.</p>
  
  <p>I'm not that well versed in Javascript and jQuery; here is what I had so far.</p>
  
  <p>Pardon my code, there are many ideas at work here:</p>
  
  <pre><code>$(document).ready(function() {
      var everyhour = new Date(); 
      //everyhour = new Date(everyhour.getFullYear() + 1, 1 - 1, 1);
      everyhour = 2014, 8-1, 25, 9, 30, 0, 0;
      // the above was my initial try and it wasn't getting me anywhere
      var date  = new Date(2014, 7, 25, 12, 0, 0);
      var now   = new Date();
      var diff  = date.getTime()/1000 - now.getTime()/1000;
      alert (diff);
      // The above was another stab at it, got me a little closer
      var minutesToAdd = 60;
      date.setMinutes(date.getMinutes()+minutesToAdd);
      // the above was something I found on this website and got brain block
     // the below was me trying to start a loop and get the date to update by adding an hour onto it
     //  for i 
     //  if diff = 3600 {
     //    var dated = dated + 1
     //  }
         $('#auctioncountdown').countdown({until: diff, format: 'HMS'});
  });  
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>