title: Correcting time for daylight savings in rails DateTime.parse
body: <p>Just adding to the million questions about time zone and DST issues out there.</p>
  
  <p>I have a form with separate date and time fields that I combine to create a DateTime like so</p>
  
  <pre><code>start_time = DateTime.parse("#{parse_date(form_date)} #{form_start_time} #{Time.zone}")
  </code></pre>
  
  <p>If I fill out my form with 21 Aug 2012 and 15:00, then these are the values that I see when I reload my form. If I then look at my start_time attribute in my model it is correctly set to <code>Tue, 21 Aug 2012 15:00:00 EST +10:00</code>.</p>
  
  <p>The problem I am having occurs if I use a date later this year once daylight savings kicks in (I am in Australia). If I use 21 Dec 2012 and 15:00 then check start_time I see <code>Fri, 21 Dec 2012 16:00:00 EST +11:00</code>.</p>
  
  <p>My interpretation of the problem is that the date is being saved in my current time zone (+10:00) as this is what I have told DateTime.parse to do. However when the value is returned, Rails is looking at the date and saying 'hey, it's daylight savings time in December' and returning the time in the +11:00 time zone.</p>
  
  <p>What I want to do is tell DateTime.parse to save the time in the +11:00 time zone if DST is in effect. Clearly passing Time.zone into my string doesn't achieve this. Is there a simple way of doing this? I can see ways of doing it using Time#dst? but I suspect that this is going to create some really ugly convoluted code. I thought there might be a built in way that I'm missing.</p>