event_calendar时区
嗨,我可能会遗漏一些东西但是event_calendar rails gem如何确定时区?
在本地,它尊重我的时区,但不在服务器上。 我在heroku上运行它所以它使用UTC来确定它在哪一天等。在Application.rb我设置
config.time_zone = "Pacific Time (US & Canada)"
。
我发现的只是这个较旧的讨论并不是决定性的。 这改变了吗? https://github.com/elevation/event_calendar/issues/4
如何设置event_calendar gem的时区? 预先感谢您的帮助。
由于我没有找到更好的方法,我分叉了这个项目 ,并将Date.today
更改为Time.zone.today
, 这是Time.zone.today
。 它一直在我的场景中工作。