From c70ebb73469ea82f5b50e7295287fae1c7aedd22 Mon Sep 17 00:00:00 2001 From: Stephen Crosby Date: Wed, 14 Oct 2015 17:27:01 -0700 Subject: [PATCH] fix time-zone dependant spec failure --- app/controllers/api/v1/notices_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/v1/notices_controller.rb b/app/controllers/api/v1/notices_controller.rb index f16710f..125465a 100644 --- a/app/controllers/api/v1/notices_controller.rb +++ b/app/controllers/api/v1/notices_controller.rb @@ -6,8 +6,8 @@ class Api::V1::NoticesController < ApplicationController fields = %w{created_at message error_class} if params.key?(:start_date) && params.key?(:end_date) - start_date = Time.parse(params[:start_date]).utc - end_date = Time.parse(params[:end_date]).utc + start_date = Time.zone.parse(params[:start_date]).utc + end_date = Time.zone.parse(params[:end_date]).utc query = {:created_at => {"$lte" => end_date, "$gte" => start_date}} end -- libgit2 0.21.2