diff options
author | gbuesing <gbuesing@gmail.com> | 2009-01-04 13:58:08 -0600 |
---|---|---|
committer | gbuesing <gbuesing@gmail.com> | 2009-01-04 13:58:08 -0600 |
commit | d2a1c2778e76ba30431121d0a9062272e0c90405 (patch) | |
tree | 3a697226be727a0c7f3f57e3b2ba65478b274b81 /activesupport/lib/active_support | |
parent | f00e86d7e9c7a4689a49fc085bcb757c5a2c0b03 (diff) | |
download | rails-d2a1c2778e76ba30431121d0a9062272e0c90405.tar.gz rails-d2a1c2778e76ba30431121d0a9062272e0c90405.tar.bz2 rails-d2a1c2778e76ba30431121d0a9062272e0c90405.zip |
TimeWithZone#- gives correct result with wrapped DateTime, and with DateTime argument
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/time_with_zone.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index 72ff684fcc..99be89fdf0 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -199,7 +199,7 @@ module ActiveSupport # If we're subtracting a Duration of variable length (i.e., years, months, days), move backwards from #time, # otherwise move backwards #utc, for accuracy when moving across DST boundaries if other.acts_like?(:time) - utc - other + utc.to_f - other.to_f elsif duration_of_variable_length?(other) method_missing(:-, other) else |