title: Create a Date with a set timezone without using a string representation
body: <p>I have a web page with three dropdowns for day, month and year. If I use the JavaScript <code>Date</code> constructor that takes numbers, then I get a <code>Date</code> object for my current timezone:</p>
  
  <pre><code>new Date(xiYear, xiMonth, xiDate)
  </code></pre>
  
  <p>Give the correct date, but it thinks that date is GMT+01:00 due to daylight savings time.</p>
  
  <p>The problem here is that I then pass this <code>Date</code> to an Ajax method and when the date is deserialised on the server it has been converted to GMT and so lost an hour which moves the day back by one.
  Now I could just pass the day, month, and year individually into the Ajax method, but it seems that there ought to be a better way.</p>
  
  <p>The accepted answer pointed me in the right direction, however just using <code>setUTCHours()</code> by itself changed:</p>
  
  <pre><code>Apr 5th 00:00 GMT+01:00 
  </code></pre>
  
  <p>to</p>
  
  <pre><code>Apr 4th 23:00 GMT+01:00
  </code></pre>
  
  <p>I then also had to set the UTC date, month and year to end up with</p>
  
  <pre><code>Apr 5th 01:00 GMT+01:00
  </code></pre>
  
  <p>which is what I wanted.</p>