1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Index: /Users/jgoebel/rails/raptor/vendor/rails/activesupport/lib/active_support/core_ext/time/zones.rb
===================================================================
--- /Users/jgoebel/rails/raptor/vendor/rails/activesupport/lib/active_support/core_ext/time/zones.rb  (revision 8714)
+++ /Users/jgoebel/rails/raptor/vendor/rails/activesupport/lib/active_support/core_ext/time/zones.rb  (working copy)
@@ -6,11 +6,23 @@
         
         def self.included(base) #:nodoc:
           base.extend(ClassMethods) if base == ::Time # i.e., don't include class methods in DateTime
+          base.class_eval do
+            alias_method :minus_without_timezone, :-
+            alias_method :-, :minus_with_timezone
+          end if base == ::Time
         end
         
         module ClassMethods
           attr_reader :zone
 
+          def minus_with_timezone(time)
+            if time===ActiveSupport::TimeWithZone
+              self-time.utc
+            else
+              minus_without_timezone(time)
+            end
+          end
+
           # Sets a global default time zone, separate from the system time zone in ENV['TZ']. 
           # Accepts either a Rails TimeZone object, a string that identifies a 
           # Rails TimeZone object (e.g., "Central Time (US & Canada)"), or a TZInfo::Timezone object