title: javascript add variable time to date and time
body: <p>I need to create a new date/time string based on some variabeles. But I'm not sure how I could do this, I've been searching a bit but can't really find a solution.</p>
  
  <pre><code>    var fields = 5; //Fields can vary from 1 tot 999;
      var currenttime = $("#serverTime").text().split(":"); //format: 23:02:59
      var timetoadd = 5*30 // 150 minutes
  
      var totalseconds = currenttime[0]*3600 + currenttime[1]*60 + currenttime[2] + timetoadd*60;
  
      var currentdate = new Date();
  </code></pre>
  
  <p>Any help would be much appreciated.</p>