Andrew Havens
2013-Aug-22 00:40 UTC
Feature Request: Allow :time_zone option when using Rails form date/time helpers
I have an issue where I need to specify a datetime_select offset by a
specific time zone that is different from the application''s default
time
zone. It would be really helpful if I could just specify the time zone that
is used as one of the multiparameter attributes, so that it would be used
when converting the params into a DateTime object. Example usage would be
something like this:
# config/application.rb
config.time_zone = ''UTC''
# _form.html.erb
datetime_select("article", "publish_at", time_zone:
"Pacific Time (US &
Canada)")
# and/or...
datetime_select("article", "publish_at", include_time_zone:
true)
The second option would display a time_zone_select, allowing the user to
choose which time zone the time should be saved in.
I''m not sure how to go about adding this feature, but I would be happy
to
help if you could point me in the right direction.
--Andrew Havens
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to rubyonrails-core+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/groups/opt_out.