event_calendar time zone

2019-06-13 15:47发布

问题:

Hi I might be missing something but how does event_calendar the rails gem determines time zone?

Locally it respects my timezone but not on server. I am running it on heroku so it used UTC to determine the day it is in etc. On Application.rb I set

config.time_zone = "Pacific Time (US & Canada)".

All I found was this older discussion that is not conclusive. Has this changed? https://github.com/elevation/event_calendar/issues/4

How can I set the timezone for event_calendar gem? Thank you in advance for your help.

回答1:

Since I haven't found a better way I forked this project and changed Date.today to Time.zone.today where appropiate. It has been working for my scenario.