URI: 
       Move to local TZ vs UTC for reporting compat - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
   DIR Log
   DIR Files
   DIR Refs
   DIR README
       ---
   DIR commit 93b2de6b613e819c4123fa15eccf878a5adb4949
   DIR parent ed69a4cfab7489d66d8c9946e8b7531d293e563c
  HTML Author: HD Moore <hd_moore@rapid7.com>
       Date:   Sat, 12 Jan 2013 21:55:18 -0600
       
       Move to local TZ vs UTC for reporting compat
       
       Diffstat:
         M app/models/call.rb                  |       1 +
         M app/models/job.rb                   |       2 +-
         M lib/warvox/jobs/analysis.rb         |       4 ++--
       
       3 files changed, 4 insertions(+), 3 deletions(-)
       ---
   DIR diff --git a/app/models/call.rb b/app/models/call.rb
       @@ -4,6 +4,7 @@ class Call < ActiveRecord::Base
                reportable :daily, :aggregation => :count, :grouping => :day, :live_data => true, :cacheable => false
                reportable :weekly, :aggregation => :count, :grouping => :week, :live_data => true, :cacheable => false
                reportable :monthly, :aggregation => :count, :grouping => :month, :live_data => true, :cacheable => false
       +
                reportable :analyzed_hourly, :aggregation => :count, :grouping => :hour, :date_column => :analysis_completed_at, :live_data => true, :cacheable => false
                reportable :analyzed_daily, :aggregation => :count, :grouping => :day, :date_column => :analysis_completed_at, :live_data => true, :cacheable => false
                reportable :analyzed_weekly, :aggregation => :count, :grouping => :week, :date_column => :analysis_completed_at, :live_data => true, :cacheable => false
   DIR diff --git a/app/models/job.rb b/app/models/job.rb
       @@ -85,7 +85,7 @@ class Job < ActiveRecord::Base
        
                def update_progress(pct)
                        if pct >= 100
       -                        self.class.update_all({ :progress => pct, :completed_at => Time.now.utc, :status => 'completed' }, { :id => self.id })
       +                        self.class.update_all({ :progress => pct, :completed_at => Time.now, :status => 'completed' }, { :id => self.id })
                        else
                                self.class.update_all({ :progress => pct }, { :id => self.id })
                        end
   DIR diff --git a/lib/warvox/jobs/analysis.rb b/lib/warvox/jobs/analysis.rb
       @@ -149,7 +149,7 @@ class Analysis < Base
                def run_analyze_call(cid, jid)
        
                        dr = Call.find(cid, :include => :job)
       -                dr.analysis_started_at = Time.now.utc
       +                dr.analysis_started_at = Time.now
                        dr.analysis_job_id = jid
                        dr.save
        
       @@ -179,7 +179,7 @@ class Analysis < Base
                                end
                        end
        
       -                dr.analysis_completed_at = Time.now.utc
       +                dr.analysis_completed_at = Time.now
        
                        rescue ::Interrupt
                        ensure