Hi,
I have stumbled upon a small issue regarding the use of Railties (Engine) and setting the time_zone.
It seems when I set the time_zone in my engine like:
class Engine < Rails::Engine config.time_zone = 'Brussels' end
The actual time zone in the application is set back to the default 'UTC' .
But if I delay setting the time zone until after initialization:
class Engine < Rails::Engine config.after_initialize do Rails::Application.config.time_zone = 'Brussels' end end
The time zone is set correctly.
On first glans, it seems that Rails doesn't take the engine setting into account, and goes ahead using the default Rails 'UTC' setting.
I don't know if this is seen as expected behavior, but for me it seems more logically that when you specify the time_zone setting in your Engine, your application takes it into account. Unless of course you overwrite it in your projects application.rb file.
Could someone elaborate on this?
Thank you in advance