From f0448f5631288e3b73f9c95ebc1870dd54967a87 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 13 Oct 2005 20:28:55 +0000 Subject: 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 --- activesupport/lib/active_support/core_ext/time/calculations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/core_ext/time/calculations.rb') 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 -- cgit v1.2.3