aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorgbuesing <gbuesing@gmail.com>2008-05-08 23:40:25 -0500
committergbuesing <gbuesing@gmail.com>2008-05-08 23:40:25 -0500
commitbfbf03ecee063adc9999c0dec50f8177594fb28f (patch)
tree669240ea7fdd60d0366e30ee28348b02c464ab14 /actionpack/lib
parent66728087d0eb99a524498e8f24725dae6073edd6 (diff)
downloadrails-bfbf03ecee063adc9999c0dec50f8177594fb28f.tar.gz
rails-bfbf03ecee063adc9999c0dec50f8177594fb28f.tar.bz2
rails-bfbf03ecee063adc9999c0dec50f8177594fb28f.zip
ActionView::InstanceTag#default_time_from_options with hash args uses Time.current as default; respects hash settings when time falls in system local spring DST gap
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-xactionpack/lib/action_view/helpers/date_helper.rb7
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