Commit c70ebb73469ea82f5b50e7295287fae1c7aedd22

Authored by Stephen Crosby
1 parent afb42823
Exists in master and in 1 other branch production

fix time-zone dependant spec failure

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
app/controllers/api/v1/notices_controller.rb
... ... @@ -6,8 +6,8 @@ class Api::V1::NoticesController < ApplicationController
6 6 fields = %w{created_at message error_class}
7 7  
8 8 if params.key?(:start_date) && params.key?(:end_date)
9   - start_date = Time.parse(params[:start_date]).utc
10   - end_date = Time.parse(params[:end_date]).utc
  9 + start_date = Time.zone.parse(params[:start_date]).utc
  10 + end_date = Time.zone.parse(params[:end_date]).utc
11 11 query = {:created_at => {"$lte" => end_date, "$gte" => start_date}}
12 12 end
13 13  
... ...