diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-05-09 10:51:57 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-05-09 10:51:57 +0100 |
commit | c99e54f4ec67cefe11787aa9ab9d8bd006e6ca71 (patch) | |
tree | c7548000db7be1adb3b12ec5e6d3877d9262f979 /actionpack/lib | |
parent | e6afd8b2736364322b673bbdcca3e9b38b6d3da0 (diff) | |
parent | dc4eec1129520ce9863c9373d7cb79d8636ab7ca (diff) | |
download | rails-c99e54f4ec67cefe11787aa9ab9d8bd006e6ca71.tar.gz rails-c99e54f4ec67cefe11787aa9ab9d8bd006e6ca71.tar.bz2 rails-c99e54f4ec67cefe11787aa9ab9d8bd006e6ca71.zip |
Merge commit 'mainstream/master'
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-x | actionpack/lib/action_view/helpers/date_helper.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb index cbd390421a..8a9c8044ae 100755 --- a/actionpack/lib/action_view/helpers/date_helper.rb +++ b/actionpack/lib/action_view/helpers/date_helper.rb @@ -283,7 +283,7 @@ module ActionView # # prefixed with 'payday' rather than 'date' # select_datetime(my_date_time, :prefix => 'payday') # - def select_date(date = Date.today, options = {}, html_options = {}) + def select_date(date = Date.current, options = {}, html_options = {}) options[:order] ||= [] [:year, :month, :day].each { |o| options[:order].push(o) unless options[:order].include?(o) } @@ -683,12 +683,13 @@ module ActionView default[:min] ||= default[:minute] default[:sec] ||= default[:second] + time = Time.current + [:year, :month, :day, :hour, :min, :sec].each do |key| - default[key] ||= Time.now.send(key) + default[key] ||= time.send(key) end - Time.mktime(default[:year], default[:month], default[:day], - default[:hour], default[:min], default[:sec]) + Time.utc(default[:year], default[:month], default[:day], default[:hour], default[:min], default[:sec]) end end end |