在我看来,application.rb我发现了以下评论
# 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)'
Run Code Online (Sandbox Code Playgroud)
从上面看,我已经config.time_zone到了EST时间.但是,仍然在DB中创建记录时,它看起来像是datetime以UTC格式存储.
他们说,在上面的评论中
...并使Active Record自动转换为此区域...
我怎么能这样做,在哪里?
此外,我将在heroku上部署这个,我希望设置继续