title: How to create a Ruby DateTime from existing Time.zone for Rails?
body: <p>I have users entering in dates in a Ruby on Rails website. I parse the dates into a DateTime object with something like:</p>
  
  <pre><code>date = DateTime.new(params[:year].to_i, params[:month].to_i, params[:day].to_i, params[:hour].to_i, params[:minute].to_i)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>date = DateTime.parse(params[:date])
  </code></pre>
  
  <p>Both <code>DateTime</code>s will <strong><em>not</em></strong> be in the time zone of the user which I previously set with something like:</p>
  
  <pre><code>Time.zone = "Pacific Time (US &amp; Canada)"
  </code></pre>
  
  <p>How do I parse the above <code>DateTime</code>s to be in the right time zone? I know the <code>DateTime.new</code> method has a 7th argument for the time offset. Is there an easy way to look up the offset for a time zone in a given time? Or should I be using something other than <code>DateTime</code>?</p>