在我的application.rb
篇文章中,我遇到了以下 comments
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
config.time_zone = 'Eastern Time (US & Canada)'
正如你从上面看到的,我已经做了config.time_zone
次了.然而,当在数据库中创建记录时,似乎datetime
是以UTC格式存储的.
在上述 comments 中,他们说
...并使活动记录自动转换到该区域...
我该怎么做,在哪里?
另外,我也会在heroku上部署这个,我希望这个设置能继续下go