diff options
author | gbuesing <gbuesing@gmail.com> | 2008-04-21 00:40:04 -0500 |
---|---|---|
committer | gbuesing <gbuesing@gmail.com> | 2008-04-21 00:40:04 -0500 |
commit | f757f5838818ce35f7927a10a8cda6f9583869c5 (patch) | |
tree | daf4e2170f579dd562eb930c6d94254670aa7401 /actionpack/lib | |
parent | c2c779044ffb1c435f4722f62fcbd400883f3225 (diff) | |
download | rails-f757f5838818ce35f7927a10a8cda6f9583869c5.tar.gz rails-f757f5838818ce35f7927a10a8cda6f9583869c5.tar.bz2 rails-f757f5838818ce35f7927a10a8cda6f9583869c5.zip |
select_datetime and select_time default to Time.zone.now when config.time_zone is set
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-x | actionpack/lib/action_view/helpers/date_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb index 23b7f3ba7c..9f7790d0f9 100755 --- a/actionpack/lib/action_view/helpers/date_helper.rb +++ b/actionpack/lib/action_view/helpers/date_helper.rb @@ -250,7 +250,7 @@ module ActionView # # prefixed with 'payday' rather than 'date' # select_datetime(my_date_time, :prefix => 'payday') # - def select_datetime(datetime = Time.now, options = {}, html_options = {}) + def select_datetime(datetime = Time.current, options = {}, html_options = {}) separator = options[:datetime_separator] || '' select_date(datetime, options, html_options) + separator + select_time(datetime, options, html_options) end @@ -321,7 +321,7 @@ module ActionView # # separated by ':' and includes an input for seconds # select_time(my_time, :time_separator => ':', :include_seconds => true) # - def select_time(datetime = Time.now, options = {}, html_options = {}) + def select_time(datetime = Time.current, options = {}, html_options = {}) separator = options[:time_separator] || '' select_hour(datetime, options, html_options) + separator + select_minute(datetime, options, html_options) + (options[:include_seconds] ? separator + select_second(datetime, options, html_options) : '') end |