LoginSignup
70

More than 5 years have passed since last update.

Rails の Timezone を日本時間に設定

Last updated at Posted at 2012-04-03

rails 3.2.2 で確認。

config/application.rb
config.time_zone = 'Tokyo'

合わせて ActiveRecord 使用時に DB に書かれる時刻も合わせたい場合は以下も追加

config/application.rb
config.active_record.default_timezone = :local

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
70