From baf139a7522550a9176a5f9442913b5f38d30fe4 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 19 Jan 2016 10:45:56 +0100 Subject: [PATCH] [bug] unable to edit event (possible fix for #17) --- app/controllers/api/events_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/events_controller.rb b/app/controllers/api/events_controller.rb index cdf804ad7..76dfe85cb 100644 --- a/app/controllers/api/events_controller.rb +++ b/app/controllers/api/events_controller.rb @@ -58,8 +58,8 @@ class API::EventsController < API::ApiController :amount, :reduced_amount, :nb_total_places, :availability_id, :all_day, :recurrence, :recurrence_end_at, :category_ids, category_ids: [], event_image_attributes: [:attachment], event_files_attributes: [:id, :attachment, :_destroy]) - start_date = Time.parse(event_preparams[:start_date]) - end_date = Time.parse(event_preparams[:end_date]) + start_date = Time.zone.parse(event_preparams[:start_date]) + end_date = Time.zone.parse(event_preparams[:end_date]) start_time = Time.parse(event_preparams[:start_time]) if event_preparams[:start_time] end_time = Time.parse(event_preparams[:end_time]) if event_preparams[:end_time] if event_preparams[:all_day] == 'true'