On 22 August 2013 00:59, Andrew Havens <[email protected]> wrote: > Hello, > > I have a Rails application with a default time zone of UTC. This works fine > for almost everything. Now I have a situation where I would like to present > the values in a datetime_select offset by a specific time zone. As far as I > know, this helper does not have an option to specify the time zone that is > used when persisting this data. When the form is submitted, it only sends > the year, month, day, hour, and minute fields. ActiveRecord is responsible > for converting these values into the time zone configured for the > application. In this case, I want to change the time zone for only these > fields so that it is localized to the user (but still store the correct UTC > time). How can I make this change? Thanks for your help!
You could adjust the values in the controller prior to saving the data. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtxmvfgevyNsn0cS7%2B%2BTB%2BH8VdGfcynaZ2UJMcWpikgZA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.

