title: Datetime form with text_field
body: <p>Is there a way to have a text_field just for the date part of a datetime attribute?  For example, I have a datetime parameter called published_on, and I'd like my text_field to only submit for the date of the datetime field (not the time).  This didn't work:</p>
  
  <pre><code>&lt;%= f.text_field :published_on, :value=&gt; (@step.published_on.strftime("%m/%d/%Y")), :ignore_time=&gt;true %&gt; 
  </code></pre>
  
  <p>and submits the parameter published_on rather than published_on(1i), published_on(2i), and published_on(3i) (for the year, hour, and minute).</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I'm able to get the parameters now, but I have a time zone error</p>
  
  <p>This is my controller code:</p>
  
  <pre><code>date = params[:step][:published_on]
  logger.debug "date: #{date}"
  time = params[:step][:"published_on(4i)"] +":" + params[:step][:"published_on(5i)"]
  logger.debug "time: #{time}"
  dateTime = date+ " " + time
  logger.debug "dateTime: #{dateTime}"
  dateTime = DateTime.strptime(dateTime, '%m/%d/%Y %H:%M')
  logger.debug "datetime: #{dateTime}"
  
  params[:step][:published_on] = dateTime
  
  params[:step].delete :"published_on(4i)"
  params[:step].delete :'published_on(5i)'
  </code></pre>
  
  <p>which prints the following log statements:</p>
  
  <pre><code>date: 01/01/2013
  time: 00:00
  dateTime: 01/01/2013 00:00
  datetime: 2013-01-01T00:00:00+00:00
  </code></pre>
  
  <p>It seems like the time is incorrect since the timezone is set to the default (00:00).  Is there any way to get the timezone passed from the form?</p>