Converting data to datetime to prevent the in_time_zone unknown function error on line 118.

This commit is contained in:
Jakub A.Tesinsky 2008-12-02 10:16:00 +01:00
parent 2980de2d8d
commit f42025e5da

View file

@ -115,7 +115,7 @@ class ApplicationController < ActionController::Base
def format_date(date)
if date
date_format = prefs.date_format
formatted_date = date.in_time_zone(prefs.time_zone).strftime("#{date_format}")
formatted_date = date.to_datetime.in_time_zone(prefs.time_zone).strftime("#{date_format}")
else
formatted_date = ''
end