<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -46,9 +46,11 @@ module Chronic
   
   class &lt;&lt; self
     attr_accessor :debug
+    attr_accessor :time_class
   end
-  
+
   self.debug = false
+  self.time_class = Time
 end
 
 alias p_orig p
@@ -127,6 +129,6 @@ class Time
       end
     end
     
-    Time.local(year, month, day, hour, minute, second)
+    Chronic.time_class.local(year, month, day, hour, minute, second)
   end
 end
\ No newline at end of file</diff>
      <filename>lib/chronic.rb</filename>
    </modified>
    <modified>
      <diff>@@ -43,7 +43,7 @@ module Chronic
       
       # get options and set defaults if necessary
       default_options = {:context =&gt; :future,
-                         :now =&gt; Time.now,
+                         :now =&gt; Chronic.time_class.now,
                          :guess =&gt; true,
                          :ambiguous_time_range =&gt; 6,
                          :endian_precedence =&gt; nil}
@@ -51,7 +51,7 @@ module Chronic
       
       # handle options that were set to nil
       options[:context] = :future unless options[:context]
-      options[:now] = Time.now unless options[:context]
+      options[:now] = Chronic.time_class.now unless options[:context]
       options[:ambiguous_time_range] = 6 unless options[:ambiguous_time_range]
             
       # ensure the specified options are valid</diff>
      <filename>lib/chronic/chronic.rb</filename>
    </modified>
    <modified>
      <diff>@@ -143,7 +143,7 @@ module Chronic
       month.start = @now
       span = month.this(options[:context])
       
-      day_start = Time.local(span.begin.year, span.begin.month, day)
+      day_start = Chronic.time_class.local(span.begin.year, span.begin.month, day)
       
       day_or_time(day_start, time_tokens, options)
     end
@@ -185,14 +185,14 @@ module Chronic
       end
       
       begin
-        Span.new(Time.local(year, month), Time.local(next_month_year, next_month_month))
+        Span.new(Chronic.time_class.local(year, month), Chronic.time_class.local(next_month_year, next_month_month))
       rescue ArgumentError
         nil
       end
     end
     
     def handle_rdn_rmn_sd_t_tz_sy(tokens, options) #:nodoc:
-      t = Time.parse(@text)
+      t = Chronic.time_class.parse(@text)
       Span.new(t, t + 1)
     end
     
@@ -204,7 +204,7 @@ module Chronic
       time_tokens = tokens.last(tokens.size - 3)
       
       begin
-        day_start = Time.local(year, month, day)
+        day_start = Chronic.time_class.local(year, month, day)
         day_or_time(day_start, time_tokens, options)
       rescue ArgumentError
         nil
@@ -225,7 +225,7 @@ module Chronic
       time_tokens = tokens.last(tokens.size - 3)
       
       begin
-        day_start = Time.local(year, month, day) #:nodoc:
+        day_start = Chronic.time_class.local(year, month, day) #:nodoc:
         day_or_time(day_start, time_tokens, options)
       rescue ArgumentError
         nil
@@ -257,7 +257,7 @@ module Chronic
       end
       
       begin
-        Span.new(Time.local(year, month), Time.local(next_month_year, next_month_month))
+        Span.new(Chronic.time_class.local(year, month), Chronic.time_class.local(next_month_year, next_month_month))
       rescue ArgumentError
         nil
       end</diff>
      <filename>lib/chronic/handlers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ class Chronic::RepeaterDay &lt; Chronic::Repeater #:nodoc:
     super
     
     if !@current_day_start
-      @current_day_start = Time.local(@now.year, @now.month, @now.day)
+      @current_day_start = Chronic.time_class.local(@now.year, @now.month, @now.day)
     end
     
     direction = pointer == :future ? 1 : -1</diff>
      <filename>lib/chronic/repeaters/repeater_day.rb</filename>
    </modified>
    <modified>
      <diff>@@ -63,7 +63,7 @@ class Chronic::RepeaterTime &lt; Chronic::Repeater #:nodoc:
     
     unless @current_time
       first = true
-      midnight = Time.local(@now.year, @now.month, @now.day)
+      midnight = Chronic.time_class.local(@now.year, @now.month, @now.day)
       yesterday_midnight = midnight - full_day
       tomorrow_midnight = midnight + full_day
 </diff>
      <filename>lib/chronic/repeaters/repeater_time.rb</filename>
    </modified>
    <modified>
      <diff>@@ -36,14 +36,14 @@ class Chronic::RepeaterWeek &lt; Chronic::Repeater #:nodoc:
     
     case pointer
     when :future
-      this_week_start = Time.local(@now.year, @now.month, @now.day, @now.hour) + Chronic::RepeaterHour::HOUR_SECONDS
+      this_week_start = Chronic.time_class.local(@now.year, @now.month, @now.day, @now.hour) + Chronic::RepeaterHour::HOUR_SECONDS
       sunday_repeater = Chronic::RepeaterDayName.new(:sunday)
       sunday_repeater.start = @now
       this_sunday_span = sunday_repeater.this(:future)
       this_week_end = this_sunday_span.begin
       Chronic::Span.new(this_week_start, this_week_end)
     when :past
-      this_week_end = Time.local(@now.year, @now.month, @now.day, @now.hour)
+      this_week_end = Chronic.time_class.local(@now.year, @now.month, @now.day, @now.hour)
       sunday_repeater = Chronic::RepeaterDayName.new(:sunday)
       sunday_repeater.start = @now
       last_sunday_span = sunday_repeater.next(:past)</diff>
      <filename>lib/chronic/repeaters/repeater_week.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f3beeba246b1f0010f5822cfc9fac27fbf7ba78a</id>
    </parent>
  </parents>
  <author>
    <name>rick</name>
    <email>technoweenie@gmail.com</email>
  </author>
  <url>http://github.com/technoweenie/chronic/commit/9979458a4c4e8010d3c3c84b616a28f128bc7f82</url>
  <id>9979458a4c4e8010d3c3c84b616a28f128bc7f82</id>
  <committed-date>2008-03-22T17:06:06-07:00</committed-date>
  <authored-date>2008-03-22T17:06:06-07:00</authored-date>
  <message>Add Chronic.time_class option.  Set it to Time.zone (ActiveSupport::TimeWithZone) for timezone goodness</message>
  <tree>73f26572cb1f3086f4728b31aae4a465d906200f</tree>
  <committer>
    <name>rick</name>
    <email>technoweenie@gmail.com</email>
  </committer>
</commit>
