I fixed this issue, by adding around filter in ApplicationController.

around_filter :use_time_zone
private
def use_time_zone(&block)
  Time.use_zone('London', &block)end

So, whenever the default timezone changed to UTC, it will override and set 
as BST.




On Monday, 17 August 2015 13:32:11 UTC+5:30, Colin Law wrote:
>
> On 16 August 2015 at 22:47, Frederick Cheung <[email protected] 
> <javascript:>> wrote: 
> > On Sunday, August 16, 2015 at 10:45:17 PM UTC+1, Shanmugavel A wrote: 
> >> Hi, 
> >> 
> >> In our rails 3.2 application, we have configured, 
> >> 
> >>     config.time_zone = 'London' 
> >>     config.active_record.default_timezone = :local 
> >> 
> > 
> > I wouldn't recommend setting default_timezone to local - it means that 
> in addition to these settings, the timezone of the application server will 
> also influence results. 
>
> Just to reinforce Fred's comment, in case you think :local means the 
> local time of the user in the browser that is not correct.  It means 
> the local time of the server which may not even be under your control. 
>
> Colin 
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/dfed3b2e-4361-424c-82db-e58b9179f8e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to