From 602929a35f5ccc72a2692e5ede29de958124bc84 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Tue, 24 Mar 2009 23:05:23 +0100 Subject: [PATCH] fix #856 where DateTimes supplied through the rest api was not converted to the users timezone --- app/models/preference.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/preference.rb b/app/models/preference.rb index d9da36bb..06dd95af 100644 --- a/app/models/preference.rb +++ b/app/models/preference.rb @@ -25,7 +25,7 @@ class Preference < ActiveRecord::Base date = nil if s.is_a?(Time) - date = s.to_date + date = s.in_time_zone(time_zone).to_date elsif s.is_a?(String) date = Date.strptime(s, date_format) else