aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/time/calculations.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-10-13 20:28:55 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-10-13 20:28:55 +0000
commitf0448f5631288e3b73f9c95ebc1870dd54967a87 (patch)
tree16f700a80c148bd3d1cadd2279e81781cc326b6c /activesupport/lib/active_support/core_ext/time/calculations.rb
parent43b6a74fb188e41ae686c2d948e876c1f84e7bdf (diff)
downloadrails-f0448f5631288e3b73f9c95ebc1870dd54967a87.tar.gz
rails-f0448f5631288e3b73f9c95ebc1870dd54967a87.tar.bz2
rails-f0448f5631288e3b73f9c95ebc1870dd54967a87.zip
Fixed that Time#change should also reset usec when also resetting minutes #2459 [ikeda@dream.big.or.jp]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2568 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/core_ext/time/calculations.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/time/calculations.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/time/calculations.rb b/activesupport/lib/active_support/core_ext/time/calculations.rb
index 451be56599..85cd318a22 100644
--- a/activesupport/lib/active_support/core_ext/time/calculations.rb
+++ b/activesupport/lib/active_support/core_ext/time/calculations.rb
@@ -41,7 +41,7 @@ module ActiveSupport #:nodoc:
options[:hour] || self.hour,
options[:min] || (options[:hour] ? 0 : self.min),
options[:sec] || ((options[:hour] || options[:min]) ? 0 : self.sec),
- options[:usec] || ((options[:hour] || options[:min] || options[:usec]) ? 0 : self.usec)
+ options[:usec] || ((options[:hour] || options[:min] || options[:sec]) ? 0 : self.usec)
)
end