diff options
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rwxr-xr-x | actionpack/lib/action_view/helpers/date_helper.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb index 542ef3ef65..8a9c8044ae 100755 --- a/actionpack/lib/action_view/helpers/date_helper.rb +++ b/actionpack/lib/action_view/helpers/date_helper.rb @@ -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 |