title: Can't get time to display in local timezone
body: <p>I am trying to get a field to display time in the current timezone. This is a 'back office' app so I could assume 'Eastern Time (US &amp; Canada)' as the correct timezone. I am looking at the start_date in another table and using that as the start_date for the first record in my bedsheet_lines table. </p>
  
  <p>[![enter image description here][1]][1]</p>
  
  <p>However, I cannot seem to get the time to display in the proper timezone (eastern)</p>
  
  <p>start_date is stored as 2017-01-03 13:26:00 
  end_date is stored as 2017-01-03 18:30:00</p>
  
  <p>I think that the problem is caused by the method I'm using to grab the previous end_time or the start_time of the parent record. </p>
  
  <p>My start and end time fields in the form are </p>
  
  <pre><code> &lt;td&gt; &lt;%= get_start_time.strftime("%I:%M %p") %&gt; &lt;/td&gt;
    &lt;td&gt; &lt;%= f.time_select :end_time,  ampm: true %&gt;&lt;/td&gt;
  </code></pre>
  
  <p>The get_start_time Helper method is </p>
  
  <pre><code> # ------------------------------------- get start time ----------------------------------------------------
    # This will get the start time either from the last bedsheet line or from the start time in the master bedsheet record.
  
    #helper_method :get_start_time
    def get_start_time
  
      last_time = BedsheetLine.where("slitter_bedsheet_id = ?", $current_bedsheet).order(:end_time).last       # Look for any bedsheet lines for the current bedsheet.
      # Get the last one.
  
      if last_time.present?                                     # This will tell us if any bedsheet lines exist for the current bedsheet
        start_time = last_time.end_time                         # if it does exist, set the start time (for the new bedsheet line) to the end time of the last bs line
      else                                                      # If a bedsheet line does not exist, grab the time from the slitter bedsheet record.
        start_time = SlitterBedsheet.find($current_bedsheet)    # find the current record
        start_time = (start_time.date.to_s + " " + start_time.start_time.to_s).to_datetime
       end
  
      return start_time                                         # send this back - NOTE - it probably comes back in a datetime format.
      # FIXME - I think this is returning UTC instead of our current timezone - Make sure the timezone is set in the environmental config.
  </code></pre>
  
  <p>I suspect that something in the get_start_time helper is removing the current timezone information and storing the time as Eastern when it should be stored as UTC. </p>
  
  <p>Summary - I need to check either the start_time listed in the parent record or the end time of the previous record if there is one and use that as the start time of the new record. Storage should be in UTC but all displays for the foreseeable future will be Eastern time. </p>
  
  <pre><code>  [1]: https://i.stack.imgur.com/NPeIe.jpg
  </code></pre>